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

Side by Side Diff: components/cronet/url_request_context_config.cc

Issue 1796253002: Add an option to disable net::BidirectionalStreamQuicImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 | « no previous file | net/http/http_network_session.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/cronet/url_request_context_config.h" 5 #include "components/cronet/url_request_context_config.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 26 matching lines...) Expand all
37 const char kQuicPacketLossThreshold[] = "packet_loss_threshold"; 37 const char kQuicPacketLossThreshold[] = "packet_loss_threshold";
38 const char kQuicIdleConnectionTimeoutSeconds[] = 38 const char kQuicIdleConnectionTimeoutSeconds[] =
39 "idle_connection_timeout_seconds"; 39 "idle_connection_timeout_seconds";
40 const char kQuicHostWhitelist[] = "host_whitelist"; 40 const char kQuicHostWhitelist[] = "host_whitelist";
41 const char kQuicCloseSessionsOnIpChange[] = "close_sessions_on_ip_change"; 41 const char kQuicCloseSessionsOnIpChange[] = "close_sessions_on_ip_change";
42 const char kQuicMigrateSessionsOnNetworkChange[] = 42 const char kQuicMigrateSessionsOnNetworkChange[] =
43 "migrate_sessions_on_network_change"; 43 "migrate_sessions_on_network_change";
44 const char kQuicPreferAes[] = "prefer_aes"; 44 const char kQuicPreferAes[] = "prefer_aes";
45 const char kQuicUserAgentId[] = "user_agent_id"; 45 const char kQuicUserAgentId[] = "user_agent_id";
46 const char kQuicMigrateSessionsEarly[] = "migrate_sessions_early"; 46 const char kQuicMigrateSessionsEarly[] = "migrate_sessions_early";
47 const char kQuicDisableBidirectionalStreams[] =
48 "quic_disable_bidirectional_streams";
47 49
48 // AsyncDNS experiment dictionary name. 50 // AsyncDNS experiment dictionary name.
49 const char kAsyncDnsFieldTrialName[] = "AsyncDNS"; 51 const char kAsyncDnsFieldTrialName[] = "AsyncDNS";
50 // Name of boolean to enable AsyncDNS experiment. 52 // Name of boolean to enable AsyncDNS experiment.
51 const char kAsyncDnsEnable[] = "enable"; 53 const char kAsyncDnsEnable[] = "enable";
52 54
53 void ParseAndSetExperimentalOptions( 55 void ParseAndSetExperimentalOptions(
54 const std::string& experimental_options, 56 const std::string& experimental_options,
55 net::URLRequestContextBuilder* context_builder, 57 net::URLRequestContextBuilder* context_builder,
56 net::NetLog* net_log) { 58 net::NetLog* net_log) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (quic_args->GetString(kQuicUserAgentId, &quic_user_agent_id)) { 163 if (quic_args->GetString(kQuicUserAgentId, &quic_user_agent_id)) {
162 context_builder->set_quic_user_agent_id(quic_user_agent_id); 164 context_builder->set_quic_user_agent_id(quic_user_agent_id);
163 } 165 }
164 166
165 bool quic_migrate_sessions_early = false; 167 bool quic_migrate_sessions_early = false;
166 if (quic_args->GetBoolean(kQuicMigrateSessionsEarly, 168 if (quic_args->GetBoolean(kQuicMigrateSessionsEarly,
167 &quic_migrate_sessions_early)) { 169 &quic_migrate_sessions_early)) {
168 context_builder->set_quic_migrate_sessions_early( 170 context_builder->set_quic_migrate_sessions_early(
169 quic_migrate_sessions_early); 171 quic_migrate_sessions_early);
170 } 172 }
173
174 bool quic_disable_bidirectional_streams = false;
175 if (quic_args->GetBoolean(kQuicDisableBidirectionalStreams,
176 &quic_disable_bidirectional_streams)) {
177 context_builder->set_quic_disable_bidirectional_streams(
178 quic_disable_bidirectional_streams);
179 }
171 } 180 }
172 181
173 const base::DictionaryValue* async_dns_args = nullptr; 182 const base::DictionaryValue* async_dns_args = nullptr;
174 if (dict->GetDictionary(kAsyncDnsFieldTrialName, &async_dns_args)) { 183 if (dict->GetDictionary(kAsyncDnsFieldTrialName, &async_dns_args)) {
175 bool async_dns_enable = false; 184 bool async_dns_enable = false;
176 if (async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable) && 185 if (async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable) &&
177 async_dns_enable) { 186 async_dns_enable) {
178 if (net_log == nullptr) { 187 if (net_log == nullptr) {
179 DCHECK(false) << "AsyncDNS experiment requires NetLog."; 188 DCHECK(false) << "AsyncDNS experiment requires NetLog.";
180 } else { 189 } else {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 275
267 ParseAndSetExperimentalOptions(experimental_options, context_builder, 276 ParseAndSetExperimentalOptions(experimental_options, context_builder,
268 net_log); 277 net_log);
269 278
270 if (mock_cert_verifier) 279 if (mock_cert_verifier)
271 context_builder->SetCertVerifier(std::move(mock_cert_verifier)); 280 context_builder->SetCertVerifier(std::move(mock_cert_verifier));
272 // TODO(mef): Use |config| to set cookies. 281 // TODO(mef): Use |config| to set cookies.
273 } 282 }
274 283
275 } // namespace cronet 284 } // namespace cronet
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698