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

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

Issue 8738001: Remove BindStateHolder and have Bind() return a Callback<> object directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more compile fixes 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/base/cookie_store_test_helpers.cc ('k') | net/net.gyp » ('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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 DCHECK_EQ(STATE_NONE, next_state_); 66 DCHECK_EQ(STATE_NONE, next_state_);
67 DCHECK(user_callback_.is_null()); 67 DCHECK(user_callback_.is_null());
68 68
69 int rv = PrepareForAuthRestart(); 69 int rv = PrepareForAuthRestart();
70 if (rv != OK || next_state_ == STATE_NONE) 70 if (rv != OK || next_state_ == STATE_NONE)
71 return rv; 71 return rv;
72 72
73 rv = DoLoop(OK); 73 rv = DoLoop(OK);
74 if (rv == ERR_IO_PENDING) 74 if (rv == ERR_IO_PENDING)
75 if (callback) { 75 if (callback) {
76 user_callback_ = base::Bind(&OldCompletionCallback::Run<int>, 76 user_callback_ = base::Bind(&OldCompletionCallbackAdapter, callback);
77 base::Unretained(callback));
78 } 77 }
79 return rv; 78 return rv;
80 } 79 }
81 80
82 const 81 const
83 scoped_refptr<HttpAuthController>& HttpProxyClientSocket::auth_controller() { 82 scoped_refptr<HttpAuthController>& HttpProxyClientSocket::auth_controller() {
84 return auth_; 83 return auth_;
85 } 84 }
86 85
87 const HttpResponseInfo* HttpProxyClientSocket::GetConnectResponseInfo() const { 86 const HttpResponseInfo* HttpProxyClientSocket::GetConnectResponseInfo() const {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 467
469 if (http_stream_parser_->IsResponseBodyComplete()) 468 if (http_stream_parser_->IsResponseBodyComplete())
470 return DidDrainBodyForAuthRestart(true); 469 return DidDrainBodyForAuthRestart(true);
471 470
472 // Keep draining. 471 // Keep draining.
473 next_state_ = STATE_DRAIN_BODY; 472 next_state_ = STATE_DRAIN_BODY;
474 return OK; 473 return OK;
475 } 474 }
476 475
477 } // namespace net 476 } // namespace net
OLDNEW
« no previous file with comments | « net/base/cookie_store_test_helpers.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698