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 26 matching lines...) Expand all Loading... |
37 #include "net/quic/quic_protocol.h" | 37 #include "net/quic/quic_protocol.h" |
38 #include "net/socket/next_proto.h" | 38 #include "net/socket/next_proto.h" |
39 #include "net/url_request/url_request_job_factory.h" | 39 #include "net/url_request/url_request_job_factory.h" |
40 | 40 |
41 namespace base { | 41 namespace base { |
42 class SingleThreadTaskRunner; | 42 class SingleThreadTaskRunner; |
43 } | 43 } |
44 | 44 |
45 namespace net { | 45 namespace net { |
46 | 46 |
| 47 class CertVerifier; |
47 class ChannelIDService; | 48 class ChannelIDService; |
48 class CookieStore; | 49 class CookieStore; |
| 50 class CTVerifier; |
49 class FtpTransactionFactory; | 51 class FtpTransactionFactory; |
50 class HostMappingRules; | 52 class HostMappingRules; |
51 class HttpAuthHandlerFactory; | 53 class HttpAuthHandlerFactory; |
52 class HttpServerProperties; | 54 class HttpServerProperties; |
53 class ProxyConfigService; | 55 class ProxyConfigService; |
54 class SocketPerformanceWatcherFactory; | 56 class SocketPerformanceWatcherFactory; |
55 class URLRequestContext; | 57 class URLRequestContext; |
56 class URLRequestInterceptor; | 58 class URLRequestInterceptor; |
57 | 59 |
58 class NET_EXPORT URLRequestContextBuilder { | 60 class NET_EXPORT URLRequestContextBuilder { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 291 |
290 void set_backoff_enabled(bool backoff_enabled) { | 292 void set_backoff_enabled(bool backoff_enabled) { |
291 backoff_enabled_ = backoff_enabled; | 293 backoff_enabled_ = backoff_enabled; |
292 } | 294 } |
293 | 295 |
294 void set_socket_performance_watcher_factory( | 296 void set_socket_performance_watcher_factory( |
295 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { | 297 SocketPerformanceWatcherFactory* socket_performance_watcher_factory) { |
296 socket_performance_watcher_factory_ = socket_performance_watcher_factory; | 298 socket_performance_watcher_factory_ = socket_performance_watcher_factory; |
297 } | 299 } |
298 | 300 |
| 301 void set_ct_verifier(std::unique_ptr<CTVerifier> ct_verifier); |
| 302 |
299 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); | 303 void SetCertVerifier(std::unique_ptr<CertVerifier> cert_verifier); |
300 | 304 |
301 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> | 305 void SetInterceptors(std::vector<std::unique_ptr<URLRequestInterceptor>> |
302 url_request_interceptors); | 306 url_request_interceptors); |
303 | 307 |
304 // Override the default in-memory cookie store and channel id service. | 308 // Override the default in-memory cookie store and channel id service. |
305 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and | 309 // If both |cookie_store| and |channel_id_service| are NULL, CookieStore and |
306 // ChannelIDService will be disabled for this context. | 310 // ChannelIDService will be disabled for this context. |
307 // If |cookie_store| is not NULL and |channel_id_service| is NULL, | 311 // If |cookie_store| is not NULL and |channel_id_service| is NULL, |
308 // only ChannelIdService is disabled for this context. | 312 // only ChannelIdService is disabled for this context. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 std::unique_ptr<ProxyConfigService> proxy_config_service_; | 366 std::unique_ptr<ProxyConfigService> proxy_config_service_; |
363 std::unique_ptr<ProxyService> proxy_service_; | 367 std::unique_ptr<ProxyService> proxy_service_; |
364 std::unique_ptr<NetworkDelegate> network_delegate_; | 368 std::unique_ptr<NetworkDelegate> network_delegate_; |
365 std::unique_ptr<ProxyDelegate> proxy_delegate_; | 369 std::unique_ptr<ProxyDelegate> proxy_delegate_; |
366 std::unique_ptr<CookieStore> cookie_store_; | 370 std::unique_ptr<CookieStore> cookie_store_; |
367 #if !defined(DISABLE_FTP_SUPPORT) | 371 #if !defined(DISABLE_FTP_SUPPORT) |
368 std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 372 std::unique_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
369 #endif | 373 #endif |
370 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 374 std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
371 std::unique_ptr<CertVerifier> cert_verifier_; | 375 std::unique_ptr<CertVerifier> cert_verifier_; |
| 376 std::unique_ptr<CTVerifier> ct_verifier_; |
372 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; | 377 std::vector<std::unique_ptr<URLRequestInterceptor>> url_request_interceptors_; |
373 std::unique_ptr<HttpServerProperties> http_server_properties_; | 378 std::unique_ptr<HttpServerProperties> http_server_properties_; |
374 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> | 379 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> |
375 protocol_handlers_; | 380 protocol_handlers_; |
376 // SocketPerformanceWatcherFactory to be used by this context builder. | 381 // SocketPerformanceWatcherFactory to be used by this context builder. |
377 // Not owned by the context builder. Once it is set to a non-null value, it | 382 // Not owned by the context builder. Once it is set to a non-null value, it |
378 // is guaranteed to be non-null during the lifetime of |this|. | 383 // is guaranteed to be non-null during the lifetime of |this|. |
379 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; | 384 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |
380 | 385 |
381 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 386 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
382 }; | 387 }; |
383 | 388 |
384 } // namespace net | 389 } // namespace net |
385 | 390 |
386 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 391 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |