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

Side by Side Diff: net/url_request/url_request_context_builder.h

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This class is useful for building a simple URLRequestContext. Most creators 5 // This class is useful for building a simple URLRequestContext. Most creators
6 // of new URLRequestContexts should use this helper class to construct it. Call 6 // of new URLRequestContexts should use this helper class to construct it. Call
7 // any configuration params, and when done, invoke Build() to construct the 7 // any configuration params, and when done, invoke Build() to construct the
8 // URLRequestContext. This URLRequestContext will own all its own storage. 8 // URLRequestContext. This URLRequestContext will own all its own storage.
9 // 9 //
10 // URLRequestContextBuilder and its associated params classes are initially 10 // URLRequestContextBuilder and its associated params classes are initially
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } 123 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; }
124 124
125 // Unlike most other setters, the builder does not take ownership of the 125 // Unlike most other setters, the builder does not take ownership of the
126 // NetworkQualityEstimator. 126 // NetworkQualityEstimator.
127 void set_network_quality_estimator( 127 void set_network_quality_estimator(
128 NetworkQualityEstimator* network_quality_estimator) { 128 NetworkQualityEstimator* network_quality_estimator) {
129 network_quality_estimator_ = network_quality_estimator; 129 network_quality_estimator_ = network_quality_estimator;
130 } 130 }
131 131
132 // Extracts the component pointers required to construct an HttpNetworkSession 132 // Extracts the component pointers required to construct an HttpNetworkSession
133 // and copies them into the Params used to create the session. This function 133 // and copies them into the HttpNetworkSession::Context used to create the
134 // should be used to ensure that a context and its associated 134 // session. This function should be used to ensure that a context and its
135 // HttpNetworkSession are consistent. 135 // associated HttpNetworkSession are consistent.
136 static void SetHttpNetworkSessionComponents( 136 static void SetHttpNetworkSessionComponents(
137 const URLRequestContext* context, 137 const URLRequestContext* request_context,
138 HttpNetworkSession::Params* params); 138 HttpNetworkSession::Context* session_context);
139 139
140 // These functions are mutually exclusive. The ProxyConfigService, if 140 // These functions are mutually exclusive. The ProxyConfigService, if
141 // set, will be used to construct a ProxyService. 141 // set, will be used to construct a ProxyService.
142 void set_proxy_config_service( 142 void set_proxy_config_service(
143 std::unique_ptr<ProxyConfigService> proxy_config_service) { 143 std::unique_ptr<ProxyConfigService> proxy_config_service) {
144 proxy_config_service_ = std::move(proxy_config_service); 144 proxy_config_service_ = std::move(proxy_config_service);
145 } 145 }
146 146
147 // Sets the proxy service. If one is not provided, by default, uses system 147 // Sets the proxy service. If one is not provided, by default, uses system
148 // libraries to evaluate PAC scripts, if available (And if not, skips PAC 148 // libraries to evaluate PAC scripts, if available (And if not, skips PAC
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // Not owned by the context builder. Once it is set to a non-null value, it 392 // Not owned by the context builder. Once it is set to a non-null value, it
393 // is guaranteed to be non-null during the lifetime of |this|. 393 // is guaranteed to be non-null during the lifetime of |this|.
394 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; 394 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_;
395 395
396 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 396 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
397 }; 397 };
398 398
399 } // namespace net 399 } // namespace net
400 400
401 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 401 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.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