| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 174   void set_quic_connection_options( | 174   void set_quic_connection_options( | 
| 175       const QuicTagVector& quic_connection_options) { | 175       const QuicTagVector& quic_connection_options) { | 
| 176     http_network_session_params_.quic_connection_options = | 176     http_network_session_params_.quic_connection_options = | 
| 177         quic_connection_options; | 177         quic_connection_options; | 
| 178   } | 178   } | 
| 179 | 179 | 
| 180   void set_throttling_enabled(bool throttling_enabled) { | 180   void set_throttling_enabled(bool throttling_enabled) { | 
| 181     throttling_enabled_ = throttling_enabled; | 181     throttling_enabled_ = throttling_enabled; | 
| 182   } | 182   } | 
| 183 | 183 | 
|  | 184   void set_backoff_enabled(bool backoff_enabled) { | 
|  | 185     backoff_enabled_ = backoff_enabled; | 
|  | 186   } | 
|  | 187 | 
| 184   void SetInterceptors( | 188   void SetInterceptors( | 
| 185       ScopedVector<URLRequestInterceptor> url_request_interceptors); | 189       ScopedVector<URLRequestInterceptor> url_request_interceptors); | 
| 186 | 190 | 
| 187   // Override the default in-memory cookie store and channel id service. | 191   // Override the default in-memory cookie store and channel id service. | 
| 188   // |cookie_store| must not be NULL. |channel_id_service| may be NULL to | 192   // |cookie_store| must not be NULL. |channel_id_service| may be NULL to | 
| 189   // disable channel id for this context. | 193   // disable channel id for this context. | 
| 190   // Note that a persistent cookie store should not be used with an in-memory | 194   // Note that a persistent cookie store should not be used with an in-memory | 
| 191   // channel id service, and one cookie store should not be shared between | 195   // channel id service, and one cookie store should not be shared between | 
| 192   // multiple channel-id stores (or used both with and without a channel id | 196   // multiple channel-id stores (or used both with and without a channel id | 
| 193   // store). | 197   // store). | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 225 #if !defined(DISABLE_FILE_SUPPORT) | 229 #if !defined(DISABLE_FILE_SUPPORT) | 
| 226   // Include support for file:// requests. | 230   // Include support for file:// requests. | 
| 227   bool file_enabled_; | 231   bool file_enabled_; | 
| 228 #endif | 232 #endif | 
| 229 #if !defined(DISABLE_FTP_SUPPORT) | 233 #if !defined(DISABLE_FTP_SUPPORT) | 
| 230   // Include support for ftp:// requests. | 234   // Include support for ftp:// requests. | 
| 231   bool ftp_enabled_; | 235   bool ftp_enabled_; | 
| 232 #endif | 236 #endif | 
| 233   bool http_cache_enabled_; | 237   bool http_cache_enabled_; | 
| 234   bool throttling_enabled_; | 238   bool throttling_enabled_; | 
|  | 239   bool backoff_enabled_; | 
| 235   bool sdch_enabled_; | 240   bool sdch_enabled_; | 
| 236 | 241 | 
| 237   scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 242   scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 
| 238   HttpCacheParams http_cache_params_; | 243   HttpCacheParams http_cache_params_; | 
| 239   HttpNetworkSessionParams http_network_session_params_; | 244   HttpNetworkSessionParams http_network_session_params_; | 
| 240   base::FilePath transport_security_persister_path_; | 245   base::FilePath transport_security_persister_path_; | 
| 241   scoped_ptr<NetLog> net_log_; | 246   scoped_ptr<NetLog> net_log_; | 
| 242   scoped_ptr<HostResolver> host_resolver_; | 247   scoped_ptr<HostResolver> host_resolver_; | 
| 243   scoped_ptr<ChannelIDService> channel_id_service_; | 248   scoped_ptr<ChannelIDService> channel_id_service_; | 
| 244   scoped_ptr<ProxyConfigService> proxy_config_service_; | 249   scoped_ptr<ProxyConfigService> proxy_config_service_; | 
| 245   scoped_ptr<ProxyService> proxy_service_; | 250   scoped_ptr<ProxyService> proxy_service_; | 
| 246   scoped_ptr<NetworkDelegate> network_delegate_; | 251   scoped_ptr<NetworkDelegate> network_delegate_; | 
| 247   scoped_refptr<CookieStore> cookie_store_; | 252   scoped_refptr<CookieStore> cookie_store_; | 
| 248   scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 253   scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 
| 249   std::vector<SchemeFactory> extra_http_auth_handlers_; | 254   std::vector<SchemeFactory> extra_http_auth_handlers_; | 
| 250   ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 255   ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 
| 251 | 256 | 
| 252   DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 257   DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 
| 253 }; | 258 }; | 
| 254 | 259 | 
| 255 }  // namespace net | 260 }  // namespace net | 
| 256 | 261 | 
| 257 #endif  // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 262 #endif  // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 
| OLD | NEW | 
|---|