| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors); | 274 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors); |
| 275 | 275 |
| 276 // Override the default in-memory cookie store and channel id service. | 276 // Override the default in-memory cookie store and channel id service. |
| 277 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to | 277 // |cookie_store| must not be NULL. |channel_id_service| may be NULL to |
| 278 // disable channel id for this context. | 278 // disable channel id for this context. |
| 279 // Note that a persistent cookie store should not be used with an in-memory | 279 // Note that a persistent cookie store should not be used with an in-memory |
| 280 // channel id service, and one cookie store should not be shared between | 280 // channel id service, and one cookie store should not be shared between |
| 281 // multiple channel-id stores (or used both with and without a channel id | 281 // multiple channel-id stores (or used both with and without a channel id |
| 282 // store). | 282 // store). |
| 283 void SetCookieAndChannelIdStores( | 283 void SetCookieAndChannelIdStores( |
| 284 const scoped_refptr<CookieStore>& cookie_store, | 284 scoped_ptr<CookieStore> cookie_store, |
| 285 scoped_ptr<ChannelIDService> channel_id_service); | 285 scoped_ptr<ChannelIDService> channel_id_service); |
| 286 | 286 |
| 287 // Sets the task runner used to perform file operations. If not set, one will | 287 // Sets the task runner used to perform file operations. If not set, one will |
| 288 // be created. | 288 // be created. |
| 289 void SetFileTaskRunner( | 289 void SetFileTaskRunner( |
| 290 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 290 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 291 | 291 |
| 292 // Note that if SDCH is enabled without a policy object observing | 292 // Note that if SDCH is enabled without a policy object observing |
| 293 // the SDCH manager and handling at least Get-Dictionary events, the | 293 // the SDCH manager and handling at least Get-Dictionary events, the |
| 294 // result will be "Content-Encoding: sdch" advertisements, but no | 294 // result will be "Content-Encoding: sdch" advertisements, but no |
| (...skipping 29 matching lines...) Expand all Loading... |
| 324 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 324 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
| 325 HttpCacheParams http_cache_params_; | 325 HttpCacheParams http_cache_params_; |
| 326 HttpNetworkSessionParams http_network_session_params_; | 326 HttpNetworkSessionParams http_network_session_params_; |
| 327 base::FilePath transport_security_persister_path_; | 327 base::FilePath transport_security_persister_path_; |
| 328 NetLog* net_log_; | 328 NetLog* net_log_; |
| 329 scoped_ptr<HostResolver> host_resolver_; | 329 scoped_ptr<HostResolver> host_resolver_; |
| 330 scoped_ptr<ChannelIDService> channel_id_service_; | 330 scoped_ptr<ChannelIDService> channel_id_service_; |
| 331 scoped_ptr<ProxyConfigService> proxy_config_service_; | 331 scoped_ptr<ProxyConfigService> proxy_config_service_; |
| 332 scoped_ptr<ProxyService> proxy_service_; | 332 scoped_ptr<ProxyService> proxy_service_; |
| 333 scoped_ptr<NetworkDelegate> network_delegate_; | 333 scoped_ptr<NetworkDelegate> network_delegate_; |
| 334 scoped_refptr<CookieStore> cookie_store_; | 334 scoped_ptr<CookieStore> cookie_store_; |
| 335 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 335 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 336 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 336 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 337 scoped_ptr<CertVerifier> cert_verifier_; | 337 scoped_ptr<CertVerifier> cert_verifier_; |
| 338 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; | 338 std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_; |
| 339 scoped_ptr<HttpServerProperties> http_server_properties_; | 339 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 340 | 340 |
| 341 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 341 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 } // namespace net | 344 } // namespace net |
| 345 | 345 |
| 346 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 346 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |