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

Side by Side Diff: net/socket/tcp_client_socket.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/socket/stream_listen_socket.cc ('k') | net/socket/tcp_socket_win.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/socket/tcp_client_socket.h" 5 #include "net/socket/tcp_client_socket.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 321
322 void TCPClientSocket::DidCompleteReadWrite(const CompletionCallback& callback, 322 void TCPClientSocket::DidCompleteReadWrite(const CompletionCallback& callback,
323 int result) { 323 int result) {
324 if (result > 0) 324 if (result > 0)
325 use_history_.set_was_used_to_convey_data(); 325 use_history_.set_was_used_to_convey_data();
326 326
327 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 327 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
328 tracked_objects::ScopedTracker tracking_profile( 328 tracked_objects::ScopedTracker tracking_profile(
329 FROM_HERE_WITH_EXPLICIT_FUNCTION( 329 FROM_HERE_WITH_EXPLICIT_FUNCTION(
330 "TCPClientSocket::DidCompleteReadWrite")); 330 "418183 TCPClientSocket::DidCompleteReadWrite"));
331 callback.Run(result); 331 callback.Run(result);
332 } 332 }
333 333
334 int TCPClientSocket::OpenSocket(AddressFamily family) { 334 int TCPClientSocket::OpenSocket(AddressFamily family) {
335 DCHECK(!socket_->IsValid()); 335 DCHECK(!socket_->IsValid());
336 336
337 int result = socket_->Open(family); 337 int result = socket_->Open(family);
338 if (result != OK) 338 if (result != OK)
339 return result; 339 return result;
340 340
341 socket_->SetDefaultOptionsForClient(); 341 socket_->SetDefaultOptionsForClient();
342 342
343 return OK; 343 return OK;
344 } 344 }
345 345
346 } // namespace net 346 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/stream_listen_socket.cc ('k') | net/socket/tcp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698