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_request.h" | 5 #include "net/http/http_stream_factory_impl_request.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "net/http/http_stream_factory_impl_job.h" | 9 #include "net/http/http_stream_factory_impl_job.h" |
10 #include "net/spdy/spdy_http_stream.h" | 10 #include "net/spdy/spdy_http_stream.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 OrphanJobsExcept(job); | 198 OrphanJobsExcept(job); |
199 else | 199 else |
200 DCHECK(jobs_.empty()); | 200 DCHECK(jobs_.empty()); |
201 delegate_->OnHttpsProxyTunnelResponse( | 201 delegate_->OnHttpsProxyTunnelResponse( |
202 response_info, used_ssl_config, used_proxy_info, stream); | 202 response_info, used_ssl_config, used_proxy_info, stream); |
203 } | 203 } |
204 | 204 |
205 int HttpStreamFactoryImpl::Request::RestartTunnelWithProxyAuth( | 205 int HttpStreamFactoryImpl::Request::RestartTunnelWithProxyAuth( |
206 const AuthCredentials& credentials) { | 206 const AuthCredentials& credentials) { |
207 DCHECK(bound_job_.get()); | 207 DCHECK(bound_job_.get()); |
208 return bound_job_->RestartTunnelWithProxyAuth(credentials); | 208 return bound_job_->RestartTunnelWithProxyAuth(); |
209 } | 209 } |
210 | 210 |
211 LoadState HttpStreamFactoryImpl::Request::GetLoadState() const { | 211 LoadState HttpStreamFactoryImpl::Request::GetLoadState() const { |
212 if (bound_job_.get()) | 212 if (bound_job_.get()) |
213 return bound_job_->GetLoadState(); | 213 return bound_job_->GetLoadState(); |
214 DCHECK(!jobs_.empty()); | 214 DCHECK(!jobs_.empty()); |
215 | 215 |
216 // Just pick the first one. | 216 // Just pick the first one. |
217 return (*jobs_.begin())->GetLoadState(); | 217 return (*jobs_.begin())->GetLoadState(); |
218 } | 218 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 RemoveRequestFromHttpPipeliningRequestMap(); | 321 RemoveRequestFromHttpPipeliningRequestMap(); |
322 | 322 |
323 std::set<Job*> tmp; | 323 std::set<Job*> tmp; |
324 tmp.swap(jobs_); | 324 tmp.swap(jobs_); |
325 | 325 |
326 for (std::set<Job*>::iterator it = tmp.begin(); it != tmp.end(); ++it) | 326 for (std::set<Job*>::iterator it = tmp.begin(); it != tmp.end(); ++it) |
327 factory_->OrphanJob(*it, this); | 327 factory_->OrphanJob(*it, this); |
328 } | 328 } |
329 | 329 |
330 } // namespace net | 330 } // namespace net |
OLD | NEW |