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

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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 PostAbortIfNecessary(&connect_callback_); 305 PostAbortIfNecessary(&connect_callback_);
306 PostAbortIfNecessary(&ssl_handshake_callback_); 306 PostAbortIfNecessary(&ssl_handshake_callback_);
307 PostAbortIfNecessary(&read_callback_); 307 PostAbortIfNecessary(&read_callback_);
308 PostAbortIfNecessary(&write_callback_); 308 PostAbortIfNecessary(&write_callback_);
309 read_buffer_ = NULL; 309 read_buffer_ = NULL;
310 bytes_to_read_ = -1; 310 bytes_to_read_ = -1;
311 server_certificate_ = NULL; 311 server_certificate_ = NULL;
312 } 312 }
313 313
314 int32_t TCPSocketShared::SetOptionImpl( 314 int32_t TCPSocketShared::SetOptionImpl(
315 PP_TCPSocket_Option_Dev name, 315 PP_TCPSocket_Option name,
316 const PP_Var& value, 316 const PP_Var& value,
317 scoped_refptr<TrackedCallback> callback) { 317 scoped_refptr<TrackedCallback> callback) {
318 if (!IsConnected()) 318 if (!IsConnected())
319 return PP_ERROR_FAILED; 319 return PP_ERROR_FAILED;
320 320
321 SocketOptionData option_data; 321 SocketOptionData option_data;
322 switch (name) { 322 switch (name) {
323 case PP_TCPSOCKET_OPTION_NO_DELAY: { 323 case PP_TCPSOCKET_OPTION_NO_DELAY: {
324 if (value.type != PP_VARTYPE_BOOL) 324 if (value.type != PP_VARTYPE_BOOL)
325 return PP_ERROR_BADARGUMENT; 325 return PP_ERROR_BADARGUMENT;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 return connection_state_ == CONNECTED || connection_state_ == SSL_CONNECTED; 363 return connection_state_ == CONNECTED || connection_state_ == SSL_CONNECTED;
364 } 364 }
365 365
366 void TCPSocketShared::PostAbortIfNecessary( 366 void TCPSocketShared::PostAbortIfNecessary(
367 scoped_refptr<TrackedCallback>* callback) { 367 scoped_refptr<TrackedCallback>* callback) {
368 if (TrackedCallback::IsPending(*callback)) 368 if (TrackedCallback::IsPending(*callback))
369 (*callback)->PostAbort(); 369 (*callback)->PostAbort();
370 } 370 }
371 371
372 } // namespace ppapi 372 } // 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