summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk/ppb_udp_socket_private_thunk.cc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:11:18 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:11:18 +0000
commit3860209812b3c57373dcd33c17cf31a1786d554b (patch)
tree2f3b63995b1f41a36c4f6549ea437e741d157938 /ppapi/thunk/ppb_udp_socket_private_thunk.cc
parent155399dd35c53dddae3d9dbcd7200c8f3999e6ef (diff)
downloadchromium_src-3860209812b3c57373dcd33c17cf31a1786d554b.zip
chromium_src-3860209812b3c57373dcd33c17cf31a1786d554b.tar.gz
chromium_src-3860209812b3c57373dcd33c17cf31a1786d554b.tar.bz2
Revert 191401 "Implemented queued UDP SendTo/RecvFrom requests. ..."
Broken on Linux ChromiumOS > Implemented queued UDP SendTo/RecvFrom requests. Exposed SO_SNDBUF and SO_RVFBUF socket options. > > BUG=154338 > TEST=browser_tests:*UDPSocketPrivate* > TBR=jschuh > > Review URL: https://chromiumcodereview.appspot.com/12316095 TBR=ygorshenin@chromium.org Review URL: https://codereview.chromium.org/13154008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_udp_socket_private_thunk.cc')
-rw-r--r--ppapi/thunk/ppb_udp_socket_private_thunk.cc67
1 files changed, 13 insertions, 54 deletions
diff --git a/ppapi/thunk/ppb_udp_socket_private_thunk.cc b/ppapi/thunk/ppb_udp_socket_private_thunk.cc
index 0b98e01..a493666 100644
--- a/ppapi/thunk/ppb_udp_socket_private_thunk.cc
+++ b/ppapi/thunk/ppb_udp_socket_private_thunk.cc
@@ -30,25 +30,15 @@ PP_Bool IsUDPSocket(PP_Resource resource) {
return PP_FromBool(enter.succeeded());
}
-int32_t SetSocketFeature_0_5(PP_Resource udp_socket,
- PP_UDPSocketFeature_Private name,
- PP_Var value) {
+int32_t SetSocketFeature(PP_Resource udp_socket,
+ PP_UDPSocketFeature_Private name,
+ PP_Var value) {
EnterUDP enter(udp_socket, true);
if (enter.failed())
return PP_ERROR_BADRESOURCE;
return enter.object()->SetSocketFeature(name, value);
}
-int32_t SetSocketFeature_0_4(PP_Resource udp_socket,
- PP_UDPSocketFeature_Private name,
- PP_Var value) {
- if (name != PP_UDPSOCKETFEATURE_ADDRESS_REUSE &&
- name != PP_UDPSOCKETFEATURE_BROADCAST) {
- return PP_ERROR_BADARGUMENT;
- }
- return SetSocketFeature_0_5(udp_socket, name, value);
-}
-
int32_t Bind(PP_Resource udp_socket,
const PP_NetAddress_Private *addr,
PP_CompletionCallback callback) {
@@ -66,26 +56,10 @@ PP_Bool GetBoundAddress(PP_Resource udp_socket,
return enter.object()->GetBoundAddress(addr);
}
-int32_t RecvFrom_0_4(PP_Resource udp_socket,
- char* buffer,
- int32_t num_bytes,
- PP_CompletionCallback callback) {
-#ifdef NDEBUG
- EnterUDP enter(udp_socket, callback, false);
-#else
- EnterUDP enter(udp_socket, callback, true);
-#endif
- if (enter.failed())
- return enter.retval();
- return enter.SetResult(enter.object()->RecvFrom_0_4(buffer, num_bytes,
- enter.callback()));
-}
-
-int32_t RecvFrom_0_5(PP_Resource udp_socket,
- char* buffer,
- int32_t num_bytes,
- PP_NetAddress_Private* addr,
- PP_CompletionCallback callback) {
+int32_t RecvFrom(PP_Resource udp_socket,
+ char* buffer,
+ int32_t num_bytes,
+ PP_CompletionCallback callback) {
#ifdef NDEBUG
EnterUDP enter(udp_socket, callback, false);
#else
@@ -93,8 +67,8 @@ int32_t RecvFrom_0_5(PP_Resource udp_socket,
#endif
if (enter.failed())
return enter.retval();
- return enter.SetResult(enter.object()->RecvFrom_0_5(buffer, num_bytes, addr,
- enter.callback()));
+ return enter.SetResult(enter.object()->RecvFrom(buffer, num_bytes,
+ enter.callback()));
}
PP_Bool GetRecvFromAddress(PP_Resource udp_socket,
@@ -127,7 +101,7 @@ const PPB_UDPSocket_Private_0_2 g_ppb_udp_socket_thunk_0_2 = {
&Create,
&IsUDPSocket,
&Bind,
- &RecvFrom_0_4,
+ &RecvFrom,
&GetRecvFromAddress,
&SendTo,
&Close
@@ -138,7 +112,7 @@ const PPB_UDPSocket_Private_0_3 g_ppb_udp_socket_thunk_0_3 = {
&IsUDPSocket,
&Bind,
&GetBoundAddress,
- &RecvFrom_0_4,
+ &RecvFrom,
&GetRecvFromAddress,
&SendTo,
&Close
@@ -147,26 +121,15 @@ const PPB_UDPSocket_Private_0_3 g_ppb_udp_socket_thunk_0_3 = {
const PPB_UDPSocket_Private_0_4 g_ppb_udp_socket_thunk_0_4 = {
&Create,
&IsUDPSocket,
- &SetSocketFeature_0_4,
+ &SetSocketFeature,
&Bind,
&GetBoundAddress,
- &RecvFrom_0_4,
+ &RecvFrom,
&GetRecvFromAddress,
&SendTo,
&Close
};
-const PPB_UDPSocket_Private_0_5 g_ppb_udp_socket_thunk_0_5 = {
- &Create,
- &IsUDPSocket,
- &SetSocketFeature_0_5,
- &Bind,
- &GetBoundAddress,
- &RecvFrom_0_5,
- &SendTo,
- &Close
-};
-
} // namespace
const PPB_UDPSocket_Private_0_2* GetPPB_UDPSocket_Private_0_2_Thunk() {
@@ -181,9 +144,5 @@ const PPB_UDPSocket_Private_0_4* GetPPB_UDPSocket_Private_0_4_Thunk() {
return &g_ppb_udp_socket_thunk_0_4;
}
-const PPB_UDPSocket_Private_0_5* GetPPB_UDPSocket_Private_0_5_Thunk() {
- return &g_ppb_udp_socket_thunk_0_5;
-}
-
} // namespace thunk
} // namespace ppapi