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

Side by Side Diff: ppapi/proxy/tcp_socket_private_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: 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/tcp_socket_private_resource.h" 5 #include "ppapi/proxy/tcp_socket_private_resource.h"
6 6
7 #include "ppapi/proxy/ppapi_messages.h" 7 #include "ppapi/proxy/ppapi_messages.h"
8 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" 8 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 int32_t TCPSocketPrivateResource::SetOption( 96 int32_t TCPSocketPrivateResource::SetOption(
97 PP_TCPSocketOption_Private name, 97 PP_TCPSocketOption_Private name,
98 const PP_Var& value, 98 const PP_Var& value,
99 scoped_refptr<TrackedCallback> callback) { 99 scoped_refptr<TrackedCallback> callback) {
100 switch (name) { 100 switch (name) {
101 case PP_TCPSOCKETOPTION_PRIVATE_INVALID: 101 case PP_TCPSOCKETOPTION_PRIVATE_INVALID:
102 return PP_ERROR_BADARGUMENT; 102 return PP_ERROR_BADARGUMENT;
103 case PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY: 103 case PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY:
104 return SetOptionImpl(PP_TCPSOCKET_OPTION_NO_DELAY, value, callback); 104 return SetOptionImpl(PP_TCPSOCKET_OPTION_NO_DELAY, value,
105 true, // Check connect() state.
106 callback);
105 default: 107 default:
106 NOTREACHED(); 108 NOTREACHED();
107 return PP_ERROR_BADARGUMENT; 109 return PP_ERROR_BADARGUMENT;
108 } 110 }
109 } 111 }
110 112
111 PP_Resource TCPSocketPrivateResource::CreateAcceptedSocket( 113 PP_Resource TCPSocketPrivateResource::CreateAcceptedSocket(
112 int /* pending_host_id */, 114 int /* pending_host_id */,
113 const PP_NetAddress_Private& /* local_addr */, 115 const PP_NetAddress_Private& /* local_addr */,
114 const PP_NetAddress_Private& /* remote_addr */) { 116 const PP_NetAddress_Private& /* remote_addr */) {
115 NOTREACHED(); 117 NOTREACHED();
116 return 0; 118 return 0;
117 } 119 }
118 120
119 } // namespace proxy 121 } // namespace proxy
120 } // namespace ppapi 122 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c ('k') | ppapi/proxy/tcp_socket_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698