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

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

Issue 8889036: Revert 113699 - base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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.h ('k') | net/socket/client_socket_pool_base_unittest.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) 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/http/http_proxy_client_socket.h" 5 #include "net/http/http_proxy_client_socket.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/auth.h" 10 #include "net/base/auth.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 return ERR_TUNNEL_CONNECTION_FAILED; 248 return ERR_TUNNEL_CONNECTION_FAILED;
249 } 249 }
250 250
251 return transport_->socket()->Read(buf, buf_len, callback); 251 return transport_->socket()->Read(buf, buf_len, callback);
252 } 252 }
253 253
254 int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len, 254 int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len,
255 OldCompletionCallback* callback) { 255 OldCompletionCallback* callback) {
256 DCHECK_EQ(STATE_DONE, next_state_); 256 DCHECK_EQ(STATE_DONE, next_state_);
257 DCHECK(!old_user_callback_ && user_callback_.is_null()); 257 DCHECK(!old_user_callback_);
258
259 return transport_->socket()->Write(buf, buf_len, callback);
260 }
261 int HttpProxyClientSocket::Write(IOBuffer* buf, int buf_len,
262 const CompletionCallback& callback) {
263 DCHECK_EQ(STATE_DONE, next_state_);
264 DCHECK(!old_user_callback_ && user_callback_.is_null());
265 258
266 return transport_->socket()->Write(buf, buf_len, callback); 259 return transport_->socket()->Write(buf, buf_len, callback);
267 } 260 }
268 261
269 bool HttpProxyClientSocket::SetReceiveBufferSize(int32 size) { 262 bool HttpProxyClientSocket::SetReceiveBufferSize(int32 size) {
270 return transport_->socket()->SetReceiveBufferSize(size); 263 return transport_->socket()->SetReceiveBufferSize(size);
271 } 264 }
272 265
273 bool HttpProxyClientSocket::SetSendBufferSize(int32 size) { 266 bool HttpProxyClientSocket::SetSendBufferSize(int32 size) {
274 return transport_->socket()->SetSendBufferSize(size); 267 return transport_->socket()->SetSendBufferSize(size);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 516
524 if (http_stream_parser_->IsResponseBodyComplete()) 517 if (http_stream_parser_->IsResponseBodyComplete())
525 return DidDrainBodyForAuthRestart(true); 518 return DidDrainBodyForAuthRestart(true);
526 519
527 // Keep draining. 520 // Keep draining.
528 next_state_ = STATE_DRAIN_BODY; 521 next_state_ = STATE_DRAIN_BODY;
529 return OK; 522 return OK;
530 } 523 }
531 524
532 } // namespace net 525 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.h ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698