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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 return rv && !HttpStreamFactory::HasSpdyExclusion(origin_); | 659 return rv && !HttpStreamFactory::HasSpdyExclusion(origin_); |
660 } | 660 } |
661 | 661 |
662 bool HttpStreamFactoryImpl::Job::ShouldForceSpdyWithoutSSL() const { | 662 bool HttpStreamFactoryImpl::Job::ShouldForceSpdyWithoutSSL() const { |
663 bool rv = force_spdy_always_ && !force_spdy_over_ssl_; | 663 bool rv = force_spdy_always_ && !force_spdy_over_ssl_; |
664 return rv && !HttpStreamFactory::HasSpdyExclusion(origin_); | 664 return rv && !HttpStreamFactory::HasSpdyExclusion(origin_); |
665 } | 665 } |
666 | 666 |
667 bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const { | 667 bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const { |
668 return session_->params().enable_quic && request_info_.url.SchemeIs("http") && | 668 return session_->params().enable_quic && request_info_.url.SchemeIs("http") && |
669 session_->params().origin_port_to_force_quic_on == origin_.port() && | 669 session_->params().origin_to_force_quic_on.Equals(origin_) && |
670 proxy_info_.is_direct(); | 670 proxy_info_.is_direct(); |
671 } | 671 } |
672 | 672 |
673 int HttpStreamFactoryImpl::Job::DoWaitForJob() { | 673 int HttpStreamFactoryImpl::Job::DoWaitForJob() { |
674 DCHECK(blocking_job_); | 674 DCHECK(blocking_job_); |
675 next_state_ = STATE_WAIT_FOR_JOB_COMPLETE; | 675 next_state_ = STATE_WAIT_FOR_JOB_COMPLETE; |
676 return ERR_IO_PENDING; | 676 return ERR_IO_PENDING; |
677 } | 677 } |
678 | 678 |
679 int HttpStreamFactoryImpl::Job::DoWaitForJobComplete(int result) { | 679 int HttpStreamFactoryImpl::Job::DoWaitForJobComplete(int result) { |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | | 1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | |
1376 net::LOAD_IS_DOWNLOAD)) { | 1376 net::LOAD_IS_DOWNLOAD)) { |
1377 // Avoid pipelining resources that may be streamed for a long time. | 1377 // Avoid pipelining resources that may be streamed for a long time. |
1378 return false; | 1378 return false; |
1379 } | 1379 } |
1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( | 1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( |
1381 *http_pipelining_key_.get()); | 1381 *http_pipelining_key_.get()); |
1382 } | 1382 } |
1383 | 1383 |
1384 } // namespace net | 1384 } // namespace net |
OLD | NEW |