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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 1665503002: [Cronet] Expose quic_user_agent_id and quic_prefer_aes config options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/url_request_context_config.cc
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
index ca88279edc21a7a24a9d51353dc40122be977b2c..f520220acbc635a9980c43664fd4a9e0625f2719 100644
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
@@ -38,6 +38,7 @@ const char kQuicPacketLossThreshold[] = "packet_loss_threshold";
const char kQuicIdleConnectionTimeoutSeconds[] =
"idle_connection_timeout_seconds";
const char kQuicHostWhitelist[] = "host_whitelist";
+const char kQuicPreferAes[] = "prefer_aes";
// AsyncDNS experiment dictionary name.
const char kAsyncDnsFieldTrialName[] = "AsyncDNS";
@@ -131,6 +132,11 @@ void ParseAndSetExperimentalOptions(
}
context_builder->set_quic_host_whitelist(hosts);
}
+
+ bool quic_prefer_aes = false;
+ if (quic_args->GetBoolean(kQuicPreferAes, &quic_prefer_aes)) {
+ context_builder->set_quic_prefer_aes(quic_prefer_aes);
+ }
}
const base::DictionaryValue* async_dns_args = nullptr;
@@ -170,6 +176,7 @@ URLRequestContextConfig::Pkp::~Pkp() {}
URLRequestContextConfig::URLRequestContextConfig(
bool enable_quic,
+ const std::string& quic_user_agent_id,
bool enable_spdy,
bool enable_sdch,
HttpCacheType http_cache,
@@ -184,6 +191,7 @@ URLRequestContextConfig::URLRequestContextConfig(
const std::string& data_reduction_secure_proxy_check_url,
scoped_ptr<net::CertVerifier> mock_cert_verifier)
: enable_quic(enable_quic),
+ quic_user_agent_id(quic_user_agent_id),
enable_spdy(enable_spdy),
enable_sdch(enable_sdch),
http_cache(http_cache),
@@ -222,6 +230,7 @@ void URLRequestContextConfig::ConfigureURLRequestContextBuilder(
context_builder->set_user_agent(user_agent);
context_builder->SetSpdyAndQuicEnabled(enable_spdy, enable_quic);
context_builder->set_sdch_enabled(enable_sdch);
+ context_builder->set_quic_user_agent_id(quic_user_agent_id);
ParseAndSetExperimentalOptions(experimental_options, context_builder,
net_log);

Powered by Google App Engine
This is Rietveld 408576698