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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (http_server_properties && | 135 if (http_server_properties && |
136 http_server_properties->SupportsSpdy(origin_server)) { | 136 http_server_properties->SupportsSpdy(origin_server)) { |
137 num_streams_ = 1; | 137 num_streams_ = 1; |
138 } else { | 138 } else { |
139 num_streams_ = num_streams; | 139 num_streams_ = num_streams; |
140 } | 140 } |
141 return StartInternal(); | 141 return StartInternal(); |
142 } | 142 } |
143 | 143 |
144 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( | 144 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( |
145 const string16& username, const string16& password) { | 145 const AuthCredentials& credentials) { |
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 LOAD_STATE_RESOLVING_PROXY_FOR_URL; |
(...skipping 986 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 |