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 e76bba3b1bb6168fc3b0c5df5811f0e3bb46151c..a644fbff486d1d6023f41e54ec25adc06e602d9b 100644 |
--- a/components/cronet/url_request_context_config.cc |
+++ b/components/cronet/url_request_context_config.cc |
@@ -55,7 +55,7 @@ void URLRequestContextConfig::ConfigureURLRequestContextBuilder( |
} else { |
context_builder->DisableHttpCache(); |
} |
- |
+ context_builder->set_user_agent(user_agent); |
context_builder->SetSpdyAndQuicEnabled(enable_spdy, enable_quic); |
// TODO(mef): Use |config| to set cookies. |
} |
@@ -73,6 +73,8 @@ void URLRequestContextConfig::RegisterJSONConverter( |
&URLRequestContextConfig::http_cache_max_size); |
converter->RegisterStringField(REQUEST_CONTEXT_CONFIG_STORAGE_PATH, |
&URLRequestContextConfig::storage_path); |
+ converter->RegisterStringField(REQUEST_CONTEXT_CONFIG_USER_AGENT, |
+ &URLRequestContextConfig::user_agent); |
converter->RegisterRepeatedMessage(REQUEST_CONTEXT_CONFIG_QUIC_HINTS, |
&URLRequestContextConfig::quic_hints); |
mmenke
2014/11/06 20:50:15
Should try to match order here and in url_request_
mef
2014/11/06 22:51:47
Done.
|
} |