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

Unified Diff: net/url_request/url_request_context_builder.h

Issue 2860813002: IOThread::ConstructSystemRequestContext defrag. (Closed)
Patch Set: empty name by default Created 3 years, 8 months 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.h
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index 53c0ec80ad89e72a959d2d0b0cd462b07bbd13f6..cc5448d09dae332648c330b1d6d2b63d7199687e 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -52,6 +52,7 @@ class CTVerifier;
class HostMappingRules;
class HttpAuthHandlerFactory;
class HttpServerProperties;
+class NetworkQualityEstimator;
class ProxyConfigService;
class SocketPerformanceWatcherFactory;
class URLRequestContext;
@@ -108,6 +109,21 @@ class NET_EXPORT URLRequestContextBuilder {
URLRequestContextBuilder();
~URLRequestContextBuilder();
+ // Sets a name for this URLRequestContext. Currently the name is used in
+ // MemoryDumpProvier to annotate memory usage. The name does not need to be
+ // unique.
+ void set_name(const char* name) { name_ = name; }
+
+ // Sets whether Brotli compression is enabled. Disabled by default;
+ void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; }
+
+ // Unlike most other setters, the builder does not take ownership of the
+ // NetworkQualityEstimator.
+ void set_network_quality_estimator(
+ NetworkQualityEstimator* network_quality_estimator) {
+ network_quality_estimator_ = network_quality_estimator;
+ }
+
// Extracts the component pointers required to construct an HttpNetworkSession
// and copies them into the Params used to create the session. This function
// should be used to ensure that a context and its associated
@@ -311,6 +327,10 @@ class NET_EXPORT URLRequestContextBuilder {
std::unique_ptr<URLRequestContext> Build();
private:
+ const char* name_;
+ bool enable_brotli_;
+ NetworkQualityEstimator* network_quality_estimator_;
+
std::string accept_language_;
std::string user_agent_;
// Include support for data:// requests.
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698