Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: ppapi/proxy/udp_socket_resource.cc

Issue 690903002: Remove timing limitation of SetOption invocation for PPAPI sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fixed implementation. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/udp_socket_resource.h" 5 #include "ppapi/proxy/udp_socket_resource.h"
6 6
7 #include "ppapi/shared_impl/tracked_callback.h" 7 #include "ppapi/shared_impl/tracked_callback.h"
8 #include "ppapi/thunk/enter.h" 8 #include "ppapi/thunk/enter.h"
9 #include "ppapi/thunk/ppb_net_address_api.h" 9 #include "ppapi/thunk/ppb_net_address_api.h"
10 #include "ppapi/thunk/resource_creation_api.h" 10 #include "ppapi/thunk/resource_creation_api.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return PP_ERROR_BADARGUMENT; 68 return PP_ERROR_BADARGUMENT;
69 69
70 return SendToImpl(buffer, num_bytes, &enter.object()->GetNetAddressPrivate(), 70 return SendToImpl(buffer, num_bytes, &enter.object()->GetNetAddressPrivate(),
71 callback); 71 callback);
72 } 72 }
73 73
74 void UDPSocketResource::Close() { 74 void UDPSocketResource::Close() {
75 CloseImpl(); 75 CloseImpl();
76 } 76 }
77 77
78 int32_t UDPSocketResource::SetOption1_0(
79 PP_UDPSocket_Option name,
80 const PP_Var& value,
81 scoped_refptr<TrackedCallback> callback) {
82 return SetOptionImpl(name, value,
83 true, // Check bind() state.
84 callback);
85 }
86
78 int32_t UDPSocketResource::SetOption( 87 int32_t UDPSocketResource::SetOption(
79 PP_UDPSocket_Option name, 88 PP_UDPSocket_Option name,
80 const PP_Var& value, 89 const PP_Var& value,
81 scoped_refptr<TrackedCallback> callback) { 90 scoped_refptr<TrackedCallback> callback) {
82 return SetOptionImpl(name, value, callback); 91 return SetOptionImpl(name, value,
92 false, // Check bind() state.
93 callback);
83 } 94 }
84 95
85 } // namespace proxy 96 } // namespace proxy
86 } // namespace ppapi 97 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698