| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 namespace base { | 42 namespace base { |
| 43 class SingleThreadTaskRunner; | 43 class SingleThreadTaskRunner; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace net { | 46 namespace net { |
| 47 | 47 |
| 48 class CertVerifier; | 48 class CertVerifier; |
| 49 class ChannelIDService; | 49 class ChannelIDService; |
| 50 class CookieStore; | 50 class CookieStore; |
| 51 class CTPolicyEnforcer; |
| 51 class CTVerifier; | 52 class CTVerifier; |
| 52 class FtpTransactionFactory; | 53 class FtpTransactionFactory; |
| 53 class HostMappingRules; | 54 class HostMappingRules; |
| 54 class HttpAuthHandlerFactory; | 55 class HttpAuthHandlerFactory; |
| 55 class HttpServerProperties; | 56 class HttpServerProperties; |
| 56 class ProxyConfigService; | 57 class ProxyConfigService; |
| 57 class SocketPerformanceWatcherFactory; | 58 class SocketPerformanceWatcherFactory; |
| 58 class URLRequestContext; | 59 class URLRequestContext; |
| 59 class URLRequestInterceptor; | 60 class URLRequestInterceptor; |
| 60 | 61 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 throttling_enabled_ = throttling_enabled; | 284 throttling_enabled_ = throttling_enabled; |
| 284 } | 285 } |
| 285 | 286 |
| 286 void set_socket_performance_watcher_factory( | 287 void set_socket_performance_watcher_factory( |
| 287 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { | 288 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { |
| 288 socket_performance_watcher_factory_ = socket_performance_watcher_factory; | 289 socket_performance_watcher_factory_ = socket_performance_watcher_factory; |
| 289 } | 290 } |
| 290 | 291 |
| 291 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); | 292 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); |
| 292 | 293 |
| 294 void set_ct_policy_enforcer( |
| 295 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer); |
| 296 |
| 293 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); | 297 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); |
| 294 | 298 |
| 295 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> | 299 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> |
| 296 url_request_interceptors); | 300 url_request_interceptors); |
| 297 | 301 |
| 298 // Override the default in-memory cookie store and channel id service. | 302 // Override the default in-memory cookie store and channel id service. |
| 299 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and | 303 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and |
| 300 // ChannelIDService will be disabled for this context. | 304 // ChannelIDService will be disabled for this context. |
| 301 // If |cookie_store| is not NULL and |channel_id_service| is NULL, | 305 // If |cookie_store| is not NULL and |channel_id_service| is NULL, |
| 302 // only ChannelIdService is disabled for this context. | 306 // only ChannelIdService is disabled for this context. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 std::unique_ptr<HostResolver> host_resolver_; | 357 std::unique_ptr<HostResolver> host_resolver_; |
| 354 std::unique_ptr<ChannelIDService> channel_id_service_; | 358 std::unique_ptr<ChannelIDService> channel_id_service_; |
| 355 std::unique_ptr<ProxyConfigService> proxy_config_service_; | 359 std::unique_ptr<ProxyConfigService> proxy_config_service_; |
| 356 std::unique_ptr<ProxyService> proxy_service_; | 360 std::unique_ptr<ProxyService> proxy_service_; |
| 357 std::unique_ptr<NetworkDelegate> network_delegate_; | 361 std::unique_ptr<NetworkDelegate> network_delegate_; |
| 358 std::unique_ptr<ProxyDelegate> proxy_delegate_; | 362 std::unique_ptr<ProxyDelegate> proxy_delegate_; |
| 359 std::unique_ptr<CookieStore> cookie_store_; | 363 std::unique_ptr<CookieStore> cookie_store_; |
| 360 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 364 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 361 std::unique_ptr<CertVerifier> cert_verifier_; | 365 std::unique_ptr<CertVerifier> cert_verifier_; |
| 362 std::unique_ptr<CTVerifier> ct_verifier_; | 366 std::unique_ptr<CTVerifier> ct_verifier_; |
| 367 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer_; |
| 363 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; | 368 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; |
| 364 std::unique_ptr<HttpServerProperties> http_server_properties_; | 369 std::unique_ptr<HttpServerProperties> http_server_properties_; |
| 365 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> | 370 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> |
| 366 protocol_handlers_; | 371 protocol_handlers_; |
| 367 // SocketPerformanceWatcherFactory to be used by this context builder. | 372 // SocketPerformanceWatcherFactory to be used by this context builder. |
| 368 // Not owned by the context builder. Once it is set to a non-null value, it | 373 // Not owned by the context builder. Once it is set to a non-null value, it |
| 369 // is guaranteed to be non-null during the lifetime of |this|. | 374 // is guaranteed to be non-null during the lifetime of |this|. |
| 370 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; | 375 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |
| 371 | 376 |
| 372 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 377 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 373 }; | 378 }; |
| 374 | 379 |
| 375 } // namespace net | 380 } // namespace net |
| 376 | 381 |
| 377 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 382 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |