Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1043)

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 1808303005: QUIC - extend origin-to-force-quic-on command line option to accept list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 1 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/quic/quic_end_to_end_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } 892 }
893 return result; 893 return result;
894 } 894 }
895 895
896 next_state_ = STATE_WAIT_FOR_JOB; 896 next_state_ = STATE_WAIT_FOR_JOB;
897 return OK; 897 return OK;
898 } 898 }
899 899
900 bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const { 900 bool HttpStreamFactoryImpl::Job::ShouldForceQuic() const {
901 return session_->params().enable_quic && 901 return session_->params().enable_quic &&
902 session_->params().origin_to_force_quic_on.Equals(server_) && 902 ContainsKey(session_->params().origins_to_force_quic_on, server_) &&
903 proxy_info_.is_direct() && origin_url_.SchemeIs("https"); 903 proxy_info_.is_direct() && origin_url_.SchemeIs("https");
904 } 904 }
905 905
906 int HttpStreamFactoryImpl::Job::DoWaitForJob() { 906 int HttpStreamFactoryImpl::Job::DoWaitForJob() {
907 if (!blocking_job_ && wait_time_.is_zero()) { 907 if (!blocking_job_ && wait_time_.is_zero()) {
908 // There is no |blocking_job_| and there is no |wait_time_|. 908 // There is no |blocking_job_| and there is no |wait_time_|.
909 next_state_ = STATE_INIT_CONNECTION; 909 next_state_ = STATE_INIT_CONNECTION;
910 return OK; 910 return OK;
911 } 911 }
912 912
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 if (connection_->socket()) { 1791 if (connection_->socket()) {
1792 ConnectionAttempts socket_attempts; 1792 ConnectionAttempts socket_attempts;
1793 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1793 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1794 request_->AddConnectionAttempts(socket_attempts); 1794 request_->AddConnectionAttempts(socket_attempts);
1795 } else { 1795 } else {
1796 request_->AddConnectionAttempts(connection_->connection_attempts()); 1796 request_->AddConnectionAttempts(connection_->connection_attempts());
1797 } 1797 }
1798 } 1798 }
1799 1799
1800 } // namespace net 1800 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/quic/quic_end_to_end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698