Commit 2d8a8ffa authored by Lily Houghton's avatar Lily Houghton Committed by Commit Bot

[Cronet] Have Cronet set the QUIC user agent id to a reasonable default on iOS.

Setting the QUIC user agent ID to a non-default value should be done using the experimental options API.

Bug: 670686
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I79bdbde1b1f8be0af3eff7d8d6080974e322b33c
Reviewed-on: https://chromium-review.googlesource.com/822811
Commit-Queue: Lily Houghton <lilyhoughton@chromium.org>
Reviewed-by: default avatarMisha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525337}
parent 319d1d3a
...@@ -79,10 +79,6 @@ class CronetEnvironment { ...@@ -79,10 +79,6 @@ class CronetEnvironment {
bool quic_enabled() const { return quic_enabled_; } bool quic_enabled() const { return quic_enabled_; }
bool brotli_enabled() const { return brotli_enabled_; } bool brotli_enabled() const { return brotli_enabled_; }
void set_quic_user_agent_id(const std::string& quic_user_agent_id) {
quic_user_agent_id_ = quic_user_agent_id;
}
void set_accept_language(const std::string& accept_language) { void set_accept_language(const std::string& accept_language) {
accept_language_ = accept_language; accept_language_ = accept_language;
} }
...@@ -174,7 +170,6 @@ class CronetEnvironment { ...@@ -174,7 +170,6 @@ class CronetEnvironment {
bool http2_enabled_; bool http2_enabled_;
bool quic_enabled_; bool quic_enabled_;
bool brotli_enabled_; bool brotli_enabled_;
std::string quic_user_agent_id_;
std::string accept_language_; std::string accept_language_;
std::string experimental_options_; std::string experimental_options_;
// Effective experimental options. Kept for NetLog. // Effective experimental options. Kept for NetLog.
......
...@@ -336,8 +336,10 @@ void CronetEnvironment::InitializeOnNetworkThread() { ...@@ -336,8 +336,10 @@ void CronetEnvironment::InitializeOnNetworkThread() {
URLRequestContextConfigBuilder context_config_builder; URLRequestContextConfigBuilder context_config_builder;
context_config_builder.enable_quic = quic_enabled_; // Enable QUIC. context_config_builder.enable_quic = quic_enabled_; // Enable QUIC.
context_config_builder.quic_user_agent_id =
getDefaultQuicUserAgentId(); // QUIC User Agent ID.
context_config_builder.enable_spdy = http2_enabled_; // Enable HTTP/2. context_config_builder.enable_spdy = http2_enabled_; // Enable HTTP/2.
context_config_builder.http_cache = http_cache_; // Set HTTP cache context_config_builder.http_cache = http_cache_; // Set HTTP cache.
context_config_builder.storage_path = context_config_builder.storage_path =
storage_path.value(); // Storage path for http cache and prefs storage. storage_path.value(); // Storage path for http cache and prefs storage.
context_config_builder.user_agent = context_config_builder.user_agent =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment