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

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

Issue 2919423002: Make URLRequestContextBuilderV8 Mojo-only. (Closed)
Patch Set: Response to comments, fix net Mojo tests on Android, change chrome/utility workaround approach 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/test/run_all_unittests.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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const URLRequestContext* request_context, 109 const URLRequestContext* request_context,
110 HttpNetworkSession::Context* session_context); 110 HttpNetworkSession::Context* session_context);
111 111
112 // These functions are mutually exclusive. The ProxyConfigService, if 112 // These functions are mutually exclusive. The ProxyConfigService, if
113 // set, will be used to construct a ProxyService. 113 // set, will be used to construct a ProxyService.
114 void set_proxy_config_service( 114 void set_proxy_config_service(
115 std::unique_ptr<ProxyConfigService> proxy_config_service) { 115 std::unique_ptr<ProxyConfigService> proxy_config_service) {
116 proxy_config_service_ = std::move(proxy_config_service); 116 proxy_config_service_ = std::move(proxy_config_service);
117 } 117 }
118 118
119 // Sets whether quick PAC checks are enabled. Defaults to true. Ignored if
120 // a ProxyService is set directly.
121 void set_pac_quick_check_enabled(bool pac_quick_check_enabled) {
122 pac_quick_check_enabled_ = pac_quick_check_enabled;
123 }
124
125 // Sets policy for sanitizing URLs before passing them to a PAC. Defaults to
126 // ProxyService::SanitizeUrlPolicy::SAFE. Ignored if
127 // a ProxyService is set directly.
128 void set_pac_sanitize_url_policy(
129 net::ProxyService::SanitizeUrlPolicy pac_sanitize_url_policy) {
130 pac_sanitize_url_policy_ = pac_sanitize_url_policy;
131 }
132
119 // Sets the proxy service. If one is not provided, by default, uses system 133 // Sets the proxy service. If one is not provided, by default, uses system
120 // libraries to evaluate PAC scripts, if available (And if not, skips PAC 134 // libraries to evaluate PAC scripts, if available (And if not, skips PAC
121 // resolution). Subclasses may override CreateProxyService for different 135 // resolution). Subclasses may override CreateProxyService for different
122 // default behavior. 136 // default behavior.
123 void set_proxy_service(std::unique_ptr<ProxyService> proxy_service) { 137 void set_proxy_service(std::unique_ptr<ProxyService> proxy_service) {
124 proxy_service_ = std::move(proxy_service); 138 proxy_service_ = std::move(proxy_service);
125 } 139 }
126 140
127 // Call these functions to specify hard-coded Accept-Language 141 // Call these functions to specify hard-coded Accept-Language
128 // or User-Agent header values for all requests that don't 142 // or User-Agent header values for all requests that don't
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 bool cookie_store_set_by_client_; 356 bool cookie_store_set_by_client_;
343 357
344 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 358 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
345 HttpCacheParams http_cache_params_; 359 HttpCacheParams http_cache_params_;
346 HttpNetworkSession::Params http_network_session_params_; 360 HttpNetworkSession::Params http_network_session_params_;
347 base::FilePath transport_security_persister_path_; 361 base::FilePath transport_security_persister_path_;
348 NetLog* net_log_; 362 NetLog* net_log_;
349 std::unique_ptr<HostResolver> host_resolver_; 363 std::unique_ptr<HostResolver> host_resolver_;
350 std::unique_ptr<ChannelIDService> channel_id_service_; 364 std::unique_ptr<ChannelIDService> channel_id_service_;
351 std::unique_ptr<ProxyConfigService> proxy_config_service_; 365 std::unique_ptr<ProxyConfigService> proxy_config_service_;
366 bool pac_quick_check_enabled_;
367 ProxyService::SanitizeUrlPolicy pac_sanitize_url_policy_;
352 std::unique_ptr<ProxyService> proxy_service_; 368 std::unique_ptr<ProxyService> proxy_service_;
353 std::unique_ptr<NetworkDelegate> network_delegate_; 369 std::unique_ptr<NetworkDelegate> network_delegate_;
354 std::unique_ptr<ProxyDelegate> proxy_delegate_; 370 std::unique_ptr<ProxyDelegate> proxy_delegate_;
355 std::unique_ptr<CookieStore> cookie_store_; 371 std::unique_ptr<CookieStore> cookie_store_;
356 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; 372 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
357 std::unique_ptr<CertVerifier> cert_verifier_; 373 std::unique_ptr<CertVerifier> cert_verifier_;
358 std::unique_ptr<CTVerifier> ct_verifier_; 374 std::unique_ptr<CTVerifier> ct_verifier_;
359 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; 375 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_;
360 std::unique_ptr<HttpServerProperties> http_server_properties_; 376 std::unique_ptr<HttpServerProperties> http_server_properties_;
361 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> 377 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>>
362 protocol_handlers_; 378 protocol_handlers_;
363 // SocketPerformanceWatcherFactory to be used by this context builder. 379 // SocketPerformanceWatcherFactory to be used by this context builder.
364 // Not owned by the context builder. Once it is set to a non-null value, it 380 // Not owned by the context builder. Once it is set to a non-null value, it
365 // is guaranteed to be non-null during the lifetime of |this|. 381 // is guaranteed to be non-null during the lifetime of |this|.
366 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; 382 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_;
367 383
368 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 384 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
369 }; 385 };
370 386
371 } // namespace net 387 } // namespace net
372 388
373 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 389 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « net/test/run_all_unittests.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