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

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

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/socket.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 IOBuffer* /* buf */, int len, const CompletionCallback& /* callback */) { 71 IOBuffer* /* buf */, int len, const CompletionCallback& /* callback */) {
72 num_bytes_read_ += len; 72 num_bytes_read_ += len;
73 return len; 73 return len;
74 } 74 }
75 75
76 virtual int Write( 76 virtual int Write(
77 IOBuffer* /* buf */, int len, OldCompletionCallback* /* callback */) { 77 IOBuffer* /* buf */, int len, OldCompletionCallback* /* callback */) {
78 was_used_to_convey_data_ = true; 78 was_used_to_convey_data_ = true;
79 return len; 79 return len;
80 } 80 }
81 virtual int Write(
82 IOBuffer* /* buf */, int len, const CompletionCallback& /* callback */) {
83 was_used_to_convey_data_ = true;
84 return len;
85 }
81 virtual bool SetReceiveBufferSize(int32 size) { return true; } 86 virtual bool SetReceiveBufferSize(int32 size) { return true; }
82 virtual bool SetSendBufferSize(int32 size) { return true; } 87 virtual bool SetSendBufferSize(int32 size) { return true; }
83 88
84 // StreamSocket implementation. 89 // StreamSocket implementation.
85 virtual int Connect(OldCompletionCallback* callback) { 90 virtual int Connect(OldCompletionCallback* callback) {
86 connected_ = true; 91 connected_ = true;
87 return OK; 92 return OK;
88 } 93 }
89 virtual int Connect(const net::CompletionCallback& callback) { 94 virtual int Connect(const net::CompletionCallback& callback) {
90 connected_ = true; 95 connected_ = true;
(...skipping 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 params_, 3509 params_,
3505 kDefaultPriority, 3510 kDefaultPriority,
3506 &callback, 3511 &callback,
3507 pool_.get(), 3512 pool_.get(),
3508 BoundNetLog())); 3513 BoundNetLog()));
3509 } 3514 }
3510 3515
3511 } // namespace 3516 } // namespace
3512 3517
3513 } // namespace net 3518 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698