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

Side by Side Diff: components/network_session_configurator/network_session_configurator.cc

Issue 1956573004: Restrict kDisableSpdy pref to only disable SPDY/3.1, not HTTP/2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: the same thing but in different files Created 4 years, 6 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 | components/network_session_configurator/network_session_configurator_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/network_session_configurator/network_session_configurator.h " 5 #include "components/network_session_configurator/network_session_configurator.h "
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 void ConfigureSpdyParams(const base::CommandLine& command_line, 100 void ConfigureSpdyParams(const base::CommandLine& command_line,
101 base::StringPiece spdy_trial_group, 101 base::StringPiece spdy_trial_group,
102 const VariationParameters& spdy_trial_params, 102 const VariationParameters& spdy_trial_params,
103 bool is_spdy_allowed_by_policy, 103 bool is_spdy_allowed_by_policy,
104 net::HttpNetworkSession::Params* params) { 104 net::HttpNetworkSession::Params* params) {
105 // Only handle SPDY field trial parameters and command line flags if 105 // Only handle SPDY field trial parameters and command line flags if
106 // "spdy.disabled" preference is not forced via policy. 106 // "spdy.disabled" preference is not forced via policy.
107 if (!is_spdy_allowed_by_policy) { 107 if (!is_spdy_allowed_by_policy) {
108 params->enable_spdy31 = false; 108 params->enable_spdy31 = false;
109 params->enable_http2 = false;
110 return; 109 return;
111 } 110 }
112 111
113 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) 112 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests))
114 net::URLFetcher::SetIgnoreCertificateRequests(true); 113 net::URLFetcher::SetIgnoreCertificateRequests(true);
115 114
116 if (command_line.HasSwitch(switches::kDisableHttp2)) { 115 if (command_line.HasSwitch(switches::kDisableHttp2)) {
117 params->enable_spdy31 = false; 116 params->enable_spdy31 = false;
118 params->enable_http2 = false; 117 params->enable_http2 = false;
119 return; 118 return;
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 const std::string& quic_user_agent_id, 609 const std::string& quic_user_agent_id,
611 net::HttpNetworkSession::Params* params) { 610 net::HttpNetworkSession::Params* params) {
612 const base::CommandLine& command_line = 611 const base::CommandLine& command_line =
613 *base::CommandLine::ForCurrentProcess(); 612 *base::CommandLine::ForCurrentProcess();
614 ParseFieldTrialsAndCommandLineInternal( 613 ParseFieldTrialsAndCommandLineInternal(
615 command_line, is_spdy_allowed_by_policy, is_quic_allowed_by_policy, 614 command_line, is_spdy_allowed_by_policy, is_quic_allowed_by_policy,
616 quic_user_agent_id, params); 615 quic_user_agent_id, params);
617 } 616 }
618 617
619 } // namespace network_session_configurator 618 } // namespace network_session_configurator
OLDNEW
« no previous file with comments | « no previous file | components/network_session_configurator/network_session_configurator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698