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

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

Issue 2403193003: Landing Recent QUIC changes until 9:41 AM, Oct 10, 2016 UTC-7 (Closed)
Patch Set: git cl format Created 4 years, 2 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 | « no previous file | net/net.gypi » ('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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_controller.h" 5 #include "net/http/http_stream_factory_impl_job_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 replacements.SetHost(endpoint->host().c_str(), 823 replacements.SetHost(endpoint->host().c_str(),
824 url::Component(0, endpoint->host().size())); 824 url::Component(0, endpoint->host().size()));
825 return url.ReplaceComponents(replacements); 825 return url.ReplaceComponents(replacements);
826 } 826 }
827 return url; 827 return url;
828 } 828 }
829 829
830 bool HttpStreamFactoryImpl::JobController::IsQuicWhitelistedForHost( 830 bool HttpStreamFactoryImpl::JobController::IsQuicWhitelistedForHost(
831 const std::string& host) { 831 const std::string& host) {
832 bool whitelist_needed = false; 832 bool whitelist_needed = false;
833 for (QuicVersion version : session_->params().quic_supported_versions) {
834 if (version <= QUIC_VERSION_30) {
835 whitelist_needed = true;
836 break;
837 }
838 }
839
840 // The QUIC whitelist is not needed in QUIC versions after 30. 833 // The QUIC whitelist is not needed in QUIC versions after 30.
841 if (!whitelist_needed) 834 if (!whitelist_needed)
842 return true; 835 return true;
843 836
844 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) 837 if (session_->params().transport_security_state->IsGooglePinnedHost(host))
845 return true; 838 return true;
846 839
847 return base::ContainsKey(session_->params().quic_host_whitelist, 840 return base::ContainsKey(session_->params().quic_host_whitelist,
848 base::ToLowerASCII(host)); 841 base::ToLowerASCII(host));
849 } 842 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 } 1073 }
1081 1074
1082 void HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() { 1075 void HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() {
1083 if (!alternative_job_ || !request_) 1076 if (!alternative_job_ || !request_)
1084 return; 1077 return;
1085 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); 1078 DCHECK(alternative_job_->alternative_proxy_server().is_valid());
1086 alternative_job_->Start(request_->stream_type()); 1079 alternative_job_->Start(request_->stream_type());
1087 } 1080 }
1088 1081
1089 } // namespace net 1082 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698