| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 bool HttpProxyClientSocket::IsConnected() const { | 156 bool HttpProxyClientSocket::IsConnected() const { |
| 157 return next_state_ == STATE_DONE && transport_->socket()->IsConnected(); | 157 return next_state_ == STATE_DONE && transport_->socket()->IsConnected(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool HttpProxyClientSocket::IsConnectedAndIdle() const { | 160 bool HttpProxyClientSocket::IsConnectedAndIdle() const { |
| 161 return next_state_ == STATE_DONE && | 161 return next_state_ == STATE_DONE && |
| 162 transport_->socket()->IsConnectedAndIdle(); | 162 transport_->socket()->IsConnectedAndIdle(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 const BoundNetLog& HttpProxyClientSocket::NetLog() const { |
| 166 return net_log_; |
| 167 } |
| 168 |
| 165 void HttpProxyClientSocket::SetSubresourceSpeculation() { | 169 void HttpProxyClientSocket::SetSubresourceSpeculation() { |
| 166 if (transport_.get() && transport_->socket()) { | 170 if (transport_.get() && transport_->socket()) { |
| 167 transport_->socket()->SetSubresourceSpeculation(); | 171 transport_->socket()->SetSubresourceSpeculation(); |
| 168 } else { | 172 } else { |
| 169 NOTREACHED(); | 173 NOTREACHED(); |
| 170 } | 174 } |
| 171 } | 175 } |
| 172 | 176 |
| 173 void HttpProxyClientSocket::SetOmniboxSpeculation() { | 177 void HttpProxyClientSocket::SetOmniboxSpeculation() { |
| 174 if (transport_.get() && transport_->socket()) { | 178 if (transport_.get() && transport_->socket()) { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 | 458 |
| 455 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_); | 459 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_); |
| 456 response_.auth_challenge = auth_->auth_info(); | 460 response_.auth_challenge = auth_->auth_info(); |
| 457 if (rv == OK) | 461 if (rv == OK) |
| 458 return ERR_PROXY_AUTH_REQUESTED; | 462 return ERR_PROXY_AUTH_REQUESTED; |
| 459 | 463 |
| 460 return rv; | 464 return rv; |
| 461 } | 465 } |
| 462 | 466 |
| 463 } // namespace net | 467 } // namespace net |
| OLD | NEW |