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

Side by Side Diff: net/http/http_proxy_client_socket.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/http/http_proxy_client_socket.h" 5 #include "net/http/http_proxy_client_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len, 232 int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len,
233 const CompletionCallback& callback) { 233 const CompletionCallback& callback) {
234 DCHECK_EQ(STATE_DONE, next_state_); 234 DCHECK_EQ(STATE_DONE, next_state_);
235 DCHECK(user_callback_.is_null()); 235 DCHECK(user_callback_.is_null());
236 236
237 return transport_->socket()->Write(buf, buf_len, callback); 237 return transport_->socket()->Write(buf, buf_len, callback);
238 } 238 }
239 239
240 bool HttpProxyClientSocket::SetReceiveBufferSize(int32 size) { 240 int HttpProxyClientSocket::SetReceiveBufferSize(int32 size) {
241 return transport_->socket()->SetReceiveBufferSize(size); 241 return transport_->socket()->SetReceiveBufferSize(size);
242 } 242 }
243 243
244 bool HttpProxyClientSocket::SetSendBufferSize(int32 size) { 244 int HttpProxyClientSocket::SetSendBufferSize(int32 size) {
245 return transport_->socket()->SetSendBufferSize(size); 245 return transport_->socket()->SetSendBufferSize(size);
246 } 246 }
247 247
248 int HttpProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { 248 int HttpProxyClientSocket::GetPeerAddress(IPEndPoint* address) const {
249 return transport_->socket()->GetPeerAddress(address); 249 return transport_->socket()->GetPeerAddress(address);
250 } 250 }
251 251
252 int HttpProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { 252 int HttpProxyClientSocket::GetLocalAddress(IPEndPoint* address) const {
253 return transport_->socket()->GetLocalAddress(address); 253 return transport_->socket()->GetLocalAddress(address);
254 } 254 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 int HttpProxyClientSocket::DoTCPRestartComplete(int result) { 530 int HttpProxyClientSocket::DoTCPRestartComplete(int result) {
531 if (result != OK) 531 if (result != OK)
532 return result; 532 return result;
533 533
534 next_state_ = STATE_GENERATE_AUTH_TOKEN; 534 next_state_ = STATE_GENERATE_AUTH_TOKEN;
535 return result; 535 return result;
536 } 536 }
537 537
538 } // namespace net 538 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698