| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 default: | 170 default: |
| 171 return LOAD_STATE_IDLE; | 171 return LOAD_STATE_IDLE; |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 void HttpStreamFactoryImpl::Job::MarkAsAlternate( | 175 void HttpStreamFactoryImpl::Job::MarkAsAlternate( |
| 176 const GURL& original_url, | 176 const GURL& original_url, |
| 177 PortAlternateProtocolPair alternate) { | 177 PortAlternateProtocolPair alternate) { |
| 178 DCHECK(!original_url_.get()); | 178 DCHECK(!original_url_.get()); |
| 179 original_url_.reset(new GURL(original_url)); | 179 original_url_.reset(new GURL(original_url)); |
| 180 if (alternate.protocol == QUIC_1) { | 180 if (alternate.protocol == QUIC) { |
| 181 DCHECK(session_->params().enable_quic); | 181 DCHECK(session_->params().enable_quic); |
| 182 using_quic_ = true; | 182 using_quic_ = true; |
| 183 } | 183 } |
| 184 } | 184 } |
| 185 | 185 |
| 186 void HttpStreamFactoryImpl::Job::WaitFor(Job* job) { | 186 void HttpStreamFactoryImpl::Job::WaitFor(Job* job) { |
| 187 DCHECK_EQ(STATE_NONE, next_state_); | 187 DCHECK_EQ(STATE_NONE, next_state_); |
| 188 DCHECK_EQ(STATE_NONE, job->next_state_); | 188 DCHECK_EQ(STATE_NONE, job->next_state_); |
| 189 DCHECK(!blocking_job_); | 189 DCHECK(!blocking_job_); |
| 190 DCHECK(!job->waiting_job_); | 190 DCHECK(!job->waiting_job_); |
| (...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | | 1356 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | |
| 1357 net::LOAD_IS_DOWNLOAD)) { | 1357 net::LOAD_IS_DOWNLOAD)) { |
| 1358 // Avoid pipelining resources that may be streamed for a long time. | 1358 // Avoid pipelining resources that may be streamed for a long time. |
| 1359 return false; | 1359 return false; |
| 1360 } | 1360 } |
| 1361 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( | 1361 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( |
| 1362 *http_pipelining_key_.get()); | 1362 *http_pipelining_key_.get()); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 } // namespace net | 1365 } // namespace net |
| OLD | NEW |