| 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_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 const string16& username, const string16& password) { | 145 const string16& username, const string16& password) { |
| 146 DCHECK(establishing_tunnel_); | 146 DCHECK(establishing_tunnel_); |
| 147 next_state_ = STATE_RESTART_TUNNEL_AUTH; | 147 next_state_ = STATE_RESTART_TUNNEL_AUTH; |
| 148 stream_.reset(); | 148 stream_.reset(); |
| 149 return RunLoop(OK); | 149 return RunLoop(OK); |
| 150 } | 150 } |
| 151 | 151 |
| 152 LoadState HttpStreamFactoryImpl::Job::GetLoadState() const { | 152 LoadState HttpStreamFactoryImpl::Job::GetLoadState() const { |
| 153 switch (next_state_) { | 153 switch (next_state_) { |
| 154 case STATE_RESOLVE_PROXY_COMPLETE: | 154 case STATE_RESOLVE_PROXY_COMPLETE: |
| 155 return LOAD_STATE_RESOLVING_PROXY_FOR_URL; | 155 return session_->proxy_service()->GetLoadState(pac_request_); |
| 156 case STATE_CREATE_STREAM_COMPLETE: | 156 case STATE_CREATE_STREAM_COMPLETE: |
| 157 return connection_->GetLoadState(); | 157 return connection_->GetLoadState(); |
| 158 case STATE_INIT_CONNECTION_COMPLETE: | 158 case STATE_INIT_CONNECTION_COMPLETE: |
| 159 return LOAD_STATE_SENDING_REQUEST; | 159 return LOAD_STATE_SENDING_REQUEST; |
| 160 default: | 160 default: |
| 161 return LOAD_STATE_IDLE; | 161 return LOAD_STATE_IDLE; |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void HttpStreamFactoryImpl::Job::MarkAsAlternate(const GURL& original_url) { | 165 void HttpStreamFactoryImpl::Job::MarkAsAlternate(const GURL& original_url) { |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 if (IsPreconnecting() || !request_) { | 1142 if (IsPreconnecting() || !request_) { |
| 1143 return false; | 1143 return false; |
| 1144 } | 1144 } |
| 1145 if (using_ssl_) { | 1145 if (using_ssl_) { |
| 1146 return false; | 1146 return false; |
| 1147 } | 1147 } |
| 1148 return request_info_.method == "GET" || request_info_.method == "HEAD"; | 1148 return request_info_.method == "GET" || request_info_.method == "HEAD"; |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 } // namespace net | 1151 } // namespace net |
| OLD | NEW |