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

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

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | « trunk/src/net/socket/tcp_client_socket.h ('k') | trunk/src/net/socket/tcp_socket_libevent.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) 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 "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // |socket_| is gone. Therefore, it is safe to use base::Unretained() here. 262 // |socket_| is gone. Therefore, it is safe to use base::Unretained() here.
263 CompletionCallback write_callback = base::Bind( 263 CompletionCallback write_callback = base::Bind(
264 &TCPClientSocket::DidCompleteReadWrite, base::Unretained(this), callback); 264 &TCPClientSocket::DidCompleteReadWrite, base::Unretained(this), callback);
265 int result = socket_->Write(buf, buf_len, write_callback); 265 int result = socket_->Write(buf, buf_len, write_callback);
266 if (result > 0) 266 if (result > 0)
267 use_history_.set_was_used_to_convey_data(); 267 use_history_.set_was_used_to_convey_data();
268 268
269 return result; 269 return result;
270 } 270 }
271 271
272 int TCPClientSocket::SetReceiveBufferSize(int32 size) { 272 bool TCPClientSocket::SetReceiveBufferSize(int32 size) {
273 return socket_->SetReceiveBufferSize(size); 273 return socket_->SetReceiveBufferSize(size);
274 } 274 }
275 275
276 int TCPClientSocket::SetSendBufferSize(int32 size) { 276 bool TCPClientSocket::SetSendBufferSize(int32 size) {
277 return socket_->SetSendBufferSize(size); 277 return socket_->SetSendBufferSize(size);
278 } 278 }
279 279
280 bool TCPClientSocket::SetKeepAlive(bool enable, int delay) { 280 bool TCPClientSocket::SetKeepAlive(bool enable, int delay) {
281 return socket_->SetKeepAlive(enable, delay); 281 return socket_->SetKeepAlive(enable, delay);
282 } 282 }
283 283
284 bool TCPClientSocket::SetNoDelay(bool no_delay) { 284 bool TCPClientSocket::SetNoDelay(bool no_delay) {
285 return socket_->SetNoDelay(no_delay); 285 return socket_->SetNoDelay(no_delay);
286 } 286 }
(...skipping 24 matching lines...) Expand all
311 int result = socket_->Open(family); 311 int result = socket_->Open(family);
312 if (result != OK) 312 if (result != OK)
313 return result; 313 return result;
314 314
315 socket_->SetDefaultOptionsForClient(); 315 socket_->SetDefaultOptionsForClient();
316 316
317 return OK; 317 return OK;
318 } 318 }
319 319
320 } // namespace net 320 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/socket/tcp_client_socket.h ('k') | trunk/src/net/socket/tcp_socket_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698