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

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

Issue 2546533003: Respect QuicAllowed policy for new streams (Closed)
Patch Set: Fixed accesses to iothread globals from UI thread Created 4 years 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
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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } 930 }
931 931
932 DCHECK_EQ(kProtoQUIC, alternative_service.protocol); 932 DCHECK_EQ(kProtoQUIC, alternative_service.protocol);
933 if (origin.host() != alternative_service.host && 933 if (origin.host() != alternative_service.host &&
934 !session_->params() 934 !session_->params()
935 .enable_quic_alternative_service_with_different_host) { 935 .enable_quic_alternative_service_with_different_host) {
936 continue; 936 continue;
937 } 937 }
938 938
939 quic_all_broken = false; 939 quic_all_broken = false;
940 if (!session_->params().enable_quic) 940 if (!session_->params().is_enable_quic_for_new_streams())
Bence 2016/12/02 18:53:26 I believe this should be gated on both: if (!sessi
pmarko 2016/12/08 17:02:00 See comment in http_stream_factory_impl_job.cc - I
941 continue; 941 continue;
942 942
943 if (!IsQuicWhitelistedForHost(origin.host())) 943 if (!IsQuicWhitelistedForHost(origin.host()))
944 continue; 944 continue;
945 945
946 if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM && 946 if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM &&
947 session_->params().quic_disable_bidirectional_streams) { 947 session_->params().quic_disable_bidirectional_streams) {
948 continue; 948 continue;
949 } 949 }
950 950
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 DCHECK(!(*alternative_proxy_server == proxy_info.proxy_server())); 1030 DCHECK(!(*alternative_proxy_server == proxy_info.proxy_server()));
1031 1031
1032 if (!alternative_proxy_server->is_https() && 1032 if (!alternative_proxy_server->is_https() &&
1033 !alternative_proxy_server->is_quic()) { 1033 !alternative_proxy_server->is_quic()) {
1034 // Alternative proxy server should be a secure server. 1034 // Alternative proxy server should be a secure server.
1035 return false; 1035 return false;
1036 } 1036 }
1037 1037
1038 if (alternative_proxy_server->is_quic()) { 1038 if (alternative_proxy_server->is_quic()) {
1039 // Check that QUIC is enabled globally, and it is not disabled. 1039 // Check that QUIC is enabled globally, and it is not disabled.
1040 if (!session_->params().enable_quic || 1040 if (!session_->params().is_enable_quic_for_new_streams() ||
Bence 2016/12/02 18:53:26 I believe this should be gated on all three: if (!
pmarko 2016/12/08 17:02:00 See comment in http_stream_factory_impl_job.cc - I
1041 session_->quic_stream_factory()->IsQuicDisabled()) { 1041 session_->quic_stream_factory()->IsQuicDisabled()) {
1042 return false; 1042 return false;
1043 } 1043 }
1044 } 1044 }
1045 1045
1046 return true; 1046 return true;
1047 } 1047 }
1048 1048
1049 void HttpStreamFactoryImpl::JobController::ReportAlternateProtocolUsage( 1049 void HttpStreamFactoryImpl::JobController::ReportAlternateProtocolUsage(
1050 Job* job) const { 1050 Job* job) const {
(...skipping 20 matching lines...) Expand all
1071 } 1071 }
1072 1072
1073 void HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() { 1073 void HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() {
1074 if (!alternative_job_ || !request_) 1074 if (!alternative_job_ || !request_)
1075 return; 1075 return;
1076 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); 1076 DCHECK(alternative_job_->alternative_proxy_server().is_valid());
1077 alternative_job_->Start(request_->stream_type()); 1077 alternative_job_->Start(request_->stream_type());
1078 } 1078 }
1079 1079
1080 } // namespace net 1080 } // namespace net
OLDNEW
« net/http/http_stream_factory_impl_job.cc ('K') | « net/http/http_stream_factory_impl_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698