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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 586143002: Initial implementation of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 6 years, 1 month 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 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.
}

Powered by Google App Engine
This is Rietveld 408576698