| Index: components/cronet/ios/cronet_environment.mm
|
| diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
|
| index 62c8407aa863134ef03416e4a4c95733e2582e29..d122171656a92804c5c1fa05f26397e0b79d3468 100644
|
| --- a/components/cronet/ios/cronet_environment.mm
|
| +++ b/components/cronet/ios/cronet_environment.mm
|
| @@ -270,8 +270,10 @@ void CronetEnvironment::InitializeOnNetworkThread() {
|
| cache_path = cache_path.Append(FILE_PATH_LITERAL("cronet"));
|
|
|
| std::unique_ptr<URLRequestContextConfig> config(new URLRequestContextConfig(
|
| - quic_enabled_, // Enable QUIC.
|
| - "", // QUIC User Agent ID.
|
| + quic_enabled_, // Enable QUIC.
|
| + quic_enabled_ && quic_user_agent_id_.empty()
|
| + ? getDefaultQuicUserAgentId()
|
| + : quic_user_agent_id_, // QUIC User Agent ID.
|
| http2_enabled_, // Enable SPDY.
|
| false, // Enable SDCH
|
| URLRequestContextConfig::DISK, // Type of http cache.
|
| @@ -358,4 +360,10 @@ void CronetEnvironment::SetHostResolverRulesOnNetworkThread(
|
| event->Signal();
|
| }
|
|
|
| +std::string CronetEnvironment::getDefaultQuicUserAgentId() const {
|
| + return base::SysNSStringToUTF8([[NSBundle mainBundle]
|
| + objectForInfoDictionaryKey:@"CFBundleDisplayName"]) +
|
| + " Cronet/" + CRONET_VERSION;
|
| +}
|
| +
|
| } // namespace cronet
|
|
|