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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 2567093002: [cronet] Add a Builder class for UrlRequestContextConfig (Closed)
Patch Set: Created 4 years 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 78497f77d576d6776c4cbdebed70437c8fa14528..4878163e5ec3dfdb46602a9ae5df8a3a8cee26b4 100644
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
@@ -392,4 +392,20 @@ void URLRequestContextConfig::ConfigureURLRequestContextBuilder(
// TODO(mef): Use |config| to set cookies.
}
+URLRequestContextConfigBuilder::URLRequestContextConfigBuilder() {}
+URLRequestContextConfigBuilder::~URLRequestContextConfigBuilder() {}
+
+std::unique_ptr<URLRequestContextConfig>
+URLRequestContextConfigBuilder::Build() {
+ std::unique_ptr<URLRequestContextConfig> config(new URLRequestContextConfig(
mef 2016/12/20 19:32:04 nit: base::MakeUnique<T> is preferred: https://cs.
lilyhoughton 2016/12/20 21:31:40 Done.
+ enable_quic, quic_user_agent_id, enable_spdy, enable_sdch, http_cache,
+ http_cache_max_size, load_disable_cache, storage_path, user_agent,
+ experimental_options, data_reduction_proxy_key,
+ data_reduction_primary_proxy, data_reduction_fallback_proxy,
+ data_reduction_secure_proxy_check_url, std::move(mock_cert_verifier),
mef 2016/12/20 19:32:04 It seems that calling Build() more than once would
lilyhoughton 2016/12/20 21:31:40 Done, documented in comment for |Build()| in .h
+ enable_network_quality_estimator,
+ bypass_public_key_pinning_for_local_trust_anchors, cert_verifier_data));
+ return config;
+}
+
} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698