| Index: ppapi/thunk/ppb_tcp_socket_private_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_tcp_socket_private_thunk.cc b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
|
| index 3997d080d1053c0d81607f31279618303f062a40..bd9703e779f335678e6756ce2bf5ae9450638cb3 100644
|
| --- a/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
|
| +++ b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc
|
| @@ -75,6 +75,22 @@ int32_t SSLHandshake(PP_Resource tcp_socket,
|
| callback));
|
| }
|
|
|
| +PP_Resource GetServerCertificate(PP_Resource tcp_socket) {
|
| + EnterTCP enter(tcp_socket, true);
|
| + if (enter.failed())
|
| + return 0;
|
| + return enter.object()->GetServerCertificate();
|
| +}
|
| +
|
| +PP_Bool AddChainBuildingCertificate(PP_Resource tcp_socket,
|
| + PP_Resource certificate,
|
| + PP_Bool trusted) {
|
| + EnterTCP enter(tcp_socket, true);
|
| + if (enter.failed())
|
| + return PP_FALSE;
|
| + return enter.object()->AddChainBuildingCertificate(certificate, trusted);
|
| +}
|
| +
|
| int32_t Read(PP_Resource tcp_socket,
|
| char* buffer,
|
| int32_t bytes_to_read,
|
| @@ -102,7 +118,20 @@ void Disconnect(PP_Resource tcp_socket) {
|
| enter.object()->Disconnect();
|
| }
|
|
|
| -const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk = {
|
| +const PPB_TCPSocket_Private_0_3 g_ppb_tcp_socket_thunk_0_3 = {
|
| + &Create,
|
| + &IsTCPSocket,
|
| + &Connect,
|
| + &ConnectWithNetAddress,
|
| + &GetLocalAddress,
|
| + &GetRemoteAddress,
|
| + &SSLHandshake,
|
| + &Read,
|
| + &Write,
|
| + &Disconnect
|
| +};
|
| +
|
| +const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk_0_4 = {
|
| &Create,
|
| &IsTCPSocket,
|
| &Connect,
|
| @@ -110,6 +139,8 @@ const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk = {
|
| &GetLocalAddress,
|
| &GetRemoteAddress,
|
| &SSLHandshake,
|
| + &GetServerCertificate,
|
| + &AddChainBuildingCertificate,
|
| &Read,
|
| &Write,
|
| &Disconnect
|
| @@ -118,7 +149,11 @@ const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk = {
|
| } // namespace
|
|
|
| const PPB_TCPSocket_Private_0_3* GetPPB_TCPSocket_Private_0_3_Thunk() {
|
| - return &g_ppb_tcp_socket_thunk;
|
| + return &g_ppb_tcp_socket_thunk_0_3;
|
| +}
|
| +
|
| +const PPB_TCPSocket_Private_0_4* GetPPB_TCPSocket_Private_0_4_Thunk() {
|
| + return &g_ppb_tcp_socket_thunk_0_4;
|
| }
|
|
|
| } // namespace thunk
|
|
|