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