| OLD | NEW |
| 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 Loading... |
| 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) | 70 if (rv != OK) |
| 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 HttpResponseInfo* HttpProxyClientSocket::GetConnectResponseInfo() const { | 81 const HttpResponseInfo* HttpProxyClientSocket::GetConnectResponseInfo() const { |
| 83 return response_.headers ? &response_ : NULL; | 82 return response_.headers ? &response_ : NULL; |
| 84 } | 83 } |
| 85 | 84 |
| 86 HttpStream* HttpProxyClientSocket::CreateConnectResponseStream() { | 85 HttpStream* HttpProxyClientSocket::CreateConnectResponseStream() { |
| 87 return new HttpBasicStream(transport_.release(), | 86 return new HttpBasicStream(transport_.release(), |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 497 |
| 499 int HttpProxyClientSocket::DoTCPRestartComplete(int result) { | 498 int HttpProxyClientSocket::DoTCPRestartComplete(int result) { |
| 500 if (result != OK) | 499 if (result != OK) |
| 501 return result; | 500 return result; |
| 502 | 501 |
| 503 next_state_ = STATE_GENERATE_AUTH_TOKEN; | 502 next_state_ = STATE_GENERATE_AUTH_TOKEN; |
| 504 return result; | 503 return result; |
| 505 } | 504 } |
| 506 | 505 |
| 507 } // namespace net | 506 } // namespace net |
| OLD | NEW |