| 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 24 matching lines...) Expand all Loading... |
| 35 class SingleThreadTaskRunner; | 35 class SingleThreadTaskRunner; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace net { | 38 namespace net { |
| 39 | 39 |
| 40 class ChannelIDService; | 40 class ChannelIDService; |
| 41 class CookieStore; | 41 class CookieStore; |
| 42 class FtpTransactionFactory; | 42 class FtpTransactionFactory; |
| 43 class HostMappingRules; | 43 class HostMappingRules; |
| 44 class HttpAuthHandlerFactory; | 44 class HttpAuthHandlerFactory; |
| 45 class HttpServerPropertiesManager; |
| 45 class ProxyConfigService; | 46 class ProxyConfigService; |
| 46 class URLRequestContext; | 47 class URLRequestContext; |
| 47 class URLRequestInterceptor; | 48 class URLRequestInterceptor; |
| 48 | 49 |
| 49 class NET_EXPORT URLRequestContextBuilder { | 50 class NET_EXPORT URLRequestContextBuilder { |
| 50 public: | 51 public: |
| 51 struct NET_EXPORT HttpCacheParams { | 52 struct NET_EXPORT HttpCacheParams { |
| 52 enum Type { | 53 enum Type { |
| 53 IN_MEMORY, | 54 IN_MEMORY, |
| 54 DISK, | 55 DISK, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void SetFileTaskRunner( | 201 void SetFileTaskRunner( |
| 201 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 202 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 202 | 203 |
| 203 // Note that if SDCH is enabled without a policy object observing | 204 // Note that if SDCH is enabled without a policy object observing |
| 204 // the SDCH manager and handling at least Get-Dictionary events, the | 205 // the SDCH manager and handling at least Get-Dictionary events, the |
| 205 // result will be "Content-Encoding: sdch" advertisements, but no | 206 // result will be "Content-Encoding: sdch" advertisements, but no |
| 206 // dictionaries fetches and no specific dictionaries advertised. | 207 // dictionaries fetches and no specific dictionaries advertised. |
| 207 // SdchOwner in net/sdch/sdch_owner.h is a simple policy object. | 208 // SdchOwner in net/sdch/sdch_owner.h is a simple policy object. |
| 208 void set_sdch_enabled(bool enable) { sdch_enabled_ = enable; } | 209 void set_sdch_enabled(bool enable) { sdch_enabled_ = enable; } |
| 209 | 210 |
| 211 // Sets a specific HttpServerPropertiesManager for use in the |
| 212 // URLRequestContext rather than creating a HttpServerPropertiesImpl by |
| 213 // default. Note that the ownership of |http_server_properties_manager| will |
| 214 // be passed to the URLRequestContext. |
| 215 void SetHttpServerPropertiesManager( |
| 216 scoped_ptr<HttpServerPropertiesManager> http_server_properties_manager); |
| 217 |
| 210 URLRequestContext* Build(); | 218 URLRequestContext* Build(); |
| 211 | 219 |
| 212 private: | 220 private: |
| 213 struct NET_EXPORT SchemeFactory { | 221 struct NET_EXPORT SchemeFactory { |
| 214 SchemeFactory(const std::string& scheme, HttpAuthHandlerFactory* factory); | 222 SchemeFactory(const std::string& scheme, HttpAuthHandlerFactory* factory); |
| 215 ~SchemeFactory(); | 223 ~SchemeFactory(); |
| 216 | 224 |
| 217 std::string scheme; | 225 std::string scheme; |
| 218 HttpAuthHandlerFactory* factory; | 226 HttpAuthHandlerFactory* factory; |
| 219 }; | 227 }; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 241 scoped_ptr<NetLog> net_log_; | 249 scoped_ptr<NetLog> net_log_; |
| 242 scoped_ptr<HostResolver> host_resolver_; | 250 scoped_ptr<HostResolver> host_resolver_; |
| 243 scoped_ptr<ChannelIDService> channel_id_service_; | 251 scoped_ptr<ChannelIDService> channel_id_service_; |
| 244 scoped_ptr<ProxyConfigService> proxy_config_service_; | 252 scoped_ptr<ProxyConfigService> proxy_config_service_; |
| 245 scoped_ptr<ProxyService> proxy_service_; | 253 scoped_ptr<ProxyService> proxy_service_; |
| 246 scoped_ptr<NetworkDelegate> network_delegate_; | 254 scoped_ptr<NetworkDelegate> network_delegate_; |
| 247 scoped_refptr<CookieStore> cookie_store_; | 255 scoped_refptr<CookieStore> cookie_store_; |
| 248 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 256 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 249 std::vector<SchemeFactory> extra_http_auth_handlers_; | 257 std::vector<SchemeFactory> extra_http_auth_handlers_; |
| 250 ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 258 ScopedVector<URLRequestInterceptor> url_request_interceptors_; |
| 259 scoped_ptr<HttpServerPropertiesManager> http_server_properties_manager_; |
| 251 | 260 |
| 252 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 261 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 253 }; | 262 }; |
| 254 | 263 |
| 255 } // namespace net | 264 } // namespace net |
| 256 | 265 |
| 257 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 266 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |