| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors); | 290 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors); |
| 291 | 291 |
| 292 // Override the default in-memory cookie store and channel id service. | 292 // Override the default in-memory cookie store and channel id service. |
| 293 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to | 293 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to |
| 294 // disable channel id for this context. | 294 // disable channel id for this context. |
| 295 // Note that a persistent cookie store should not be used with an in-memory | 295 // Note that a persistent cookie store should not be used with an in-memory |
| 296 // channel id service, and one cookie store should not be shared between | 296 // channel id service, and one cookie store should not be shared between |
| 297 // multiple channel-id stores (or used both with and without a channel id | 297 // multiple channel-id stores (or used both with and without a channel id |
| 298 // store). | 298 // store). |
| 299 void SetCookieAndChannelIdStores( | 299 void SetCookieAndChannelIdStores( |
| 300 const scoped_refptr<CookieStore>& cookie_store, | 300 scoped_ptr<CookieStore> cookie_store, |
| 301 scoped_ptr<ChannelIDService> channel_id_service); | 301 scoped_ptr<ChannelIDService> channel_id_service); |
| 302 | 302 |
| 303 // Sets the task runner used to perform file operations. If not set, one will | 303 // Sets the task runner used to perform file operations. If not set, one will |
| 304 // be created. | 304 // be created. |
| 305 void SetFileTaskRunner( | 305 void SetFileTaskRunner( |
| 306 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 306 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 307 | 307 |
| 308 // Note that if SDCH is enabled without a policy object observing | 308 // Note that if SDCH is enabled without a policy object observing |
| 309 // the SDCH manager and handling at least Get-Dictionary events, the | 309 // the SDCH manager and handling at least Get-Dictionary events, the |
| 310 // result will be "Content-Encoding: sdch" advertisements, but no | 310 // result will be "Content-Encoding: sdch" advertisements, but no |
| (...skipping 30 matching lines...) Expand all Loading... |
| 341 HttpCacheParams http_cache_params_; | 341 HttpCacheParams http_cache_params_; |
| 342 HttpNetworkSessionParams http_network_session_params_; | 342 HttpNetworkSessionParams http_network_session_params_; |
| 343 base::FilePath transport_security_persister_path_; | 343 base::FilePath transport_security_persister_path_; |
| 344 NetLog* net_log_; | 344 NetLog* net_log_; |
| 345 scoped_ptr<HostResolver> host_resolver_; | 345 scoped_ptr<HostResolver> host_resolver_; |
| 346 scoped_ptr<ChannelIDService> channel_id_service_; | 346 scoped_ptr<ChannelIDService> channel_id_service_; |
| 347 scoped_ptr<ProxyConfigService> proxy_config_service_; | 347 scoped_ptr<ProxyConfigService> proxy_config_service_; |
| 348 scoped_ptr<ProxyService> proxy_service_; | 348 scoped_ptr<ProxyService> proxy_service_; |
| 349 scoped_ptr<NetworkDelegate> network_delegate_; | 349 scoped_ptr<NetworkDelegate> network_delegate_; |
| 350 scoped_ptr<ProxyDelegate> proxy_delegate_; | 350 scoped_ptr<ProxyDelegate> proxy_delegate_; |
| 351 scoped_refptr<CookieStore> cookie_store_; | 351 scoped_ptr<CookieStore> cookie_store_; |
| 352 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 352 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 353 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 353 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 354 scoped_ptr<CertVerifier> cert_verifier_; | 354 scoped_ptr<CertVerifier> cert_verifier_; |
| 355 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; | 355 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; |
| 356 scoped_ptr<HttpServerProperties> http_server_properties_; | 356 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 357 std::map<std::string, scoped_ptr<URLRequestJobFactory::ProtocolHandler>> | 357 std::map<std::string, scoped_ptr<URLRequestJobFactory::ProtocolHandler>> |
| 358 protocol_handlers_; | 358 protocol_handlers_; |
| 359 | 359 |
| 360 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 360 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 361 }; | 361 }; |
| 362 | 362 |
| 363 } // namespace net | 363 } // namespace net |
| 364 | 364 |
| 365 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 365 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |