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

Side by Side Diff: ppapi/shared_impl/tcp_socket_shared.cc

Issue 17314012: Move PPB_TCPSocket out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/tcp_socket_shared.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shared_impl/tcp_socket_shared.h" 5 #include "ppapi/shared_impl/tcp_socket_shared.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 PostAbortIfNecessary(&connect_callback_); 297 PostAbortIfNecessary(&connect_callback_);
298 PostAbortIfNecessary(&ssl_handshake_callback_); 298 PostAbortIfNecessary(&ssl_handshake_callback_);
299 PostAbortIfNecessary(&read_callback_); 299 PostAbortIfNecessary(&read_callback_);
300 PostAbortIfNecessary(&write_callback_); 300 PostAbortIfNecessary(&write_callback_);
301 read_buffer_ = NULL; 301 read_buffer_ = NULL;
302 bytes_to_read_ = -1; 302 bytes_to_read_ = -1;
303 server_certificate_ = NULL; 303 server_certificate_ = NULL;
304 } 304 }
305 305
306 int32_t TCPSocketShared::SetOptionImpl( 306 int32_t TCPSocketShared::SetOptionImpl(
307 PP_TCPSocket_Option_Dev name, 307 PP_TCPSocket_Option name,
308 const PP_Var& value, 308 const PP_Var& value,
309 scoped_refptr<TrackedCallback> callback) { 309 scoped_refptr<TrackedCallback> callback) {
310 if (!IsConnected()) 310 if (!IsConnected())
311 return PP_ERROR_FAILED; 311 return PP_ERROR_FAILED;
312 312
313 SocketOptionData option_data; 313 SocketOptionData option_data;
314 switch (name) { 314 switch (name) {
315 case PP_TCPSOCKET_OPTION_NO_DELAY: { 315 case PP_TCPSOCKET_OPTION_NO_DELAY: {
316 if (value.type != PP_VARTYPE_BOOL) 316 if (value.type != PP_VARTYPE_BOOL)
317 return PP_ERROR_BADARGUMENT; 317 return PP_ERROR_BADARGUMENT;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return connection_state_ == CONNECTED || connection_state_ == SSL_CONNECTED; 355 return connection_state_ == CONNECTED || connection_state_ == SSL_CONNECTED;
356 } 356 }
357 357
358 void TCPSocketShared::PostAbortIfNecessary( 358 void TCPSocketShared::PostAbortIfNecessary(
359 scoped_refptr<TrackedCallback>* callback) { 359 scoped_refptr<TrackedCallback>* callback) {
360 if (TrackedCallback::IsPending(*callback)) 360 if (TrackedCallback::IsPending(*callback))
361 (*callback)->PostAbort(); 361 (*callback)->PostAbort();
362 } 362 }
363 363
364 } // namespace ppapi 364 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/tcp_socket_shared.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698