| 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 HttpServerProperties; |
| 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. |
| 214 void SetHttpServerProperties( |
| 215 scoped_ptr<HttpServerProperties> http_server_properties); |
| 216 |
| 210 URLRequestContext* Build(); | 217 URLRequestContext* Build(); |
| 211 | 218 |
| 212 private: | 219 private: |
| 213 struct NET_EXPORT SchemeFactory { | 220 struct NET_EXPORT SchemeFactory { |
| 214 SchemeFactory(const std::string& scheme, HttpAuthHandlerFactory* factory); | 221 SchemeFactory(const std::string& scheme, HttpAuthHandlerFactory* factory); |
| 215 ~SchemeFactory(); | 222 ~SchemeFactory(); |
| 216 | 223 |
| 217 std::string scheme; | 224 std::string scheme; |
| 218 HttpAuthHandlerFactory* factory; | 225 HttpAuthHandlerFactory* factory; |
| 219 }; | 226 }; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 241 scoped_ptr<NetLog> net_log_; | 248 scoped_ptr<NetLog> net_log_; |
| 242 scoped_ptr<HostResolver> host_resolver_; | 249 scoped_ptr<HostResolver> host_resolver_; |
| 243 scoped_ptr<ChannelIDService> channel_id_service_; | 250 scoped_ptr<ChannelIDService> channel_id_service_; |
| 244 scoped_ptr<ProxyConfigService> proxy_config_service_; | 251 scoped_ptr<ProxyConfigService> proxy_config_service_; |
| 245 scoped_ptr<ProxyService> proxy_service_; | 252 scoped_ptr<ProxyService> proxy_service_; |
| 246 scoped_ptr<NetworkDelegate> network_delegate_; | 253 scoped_ptr<NetworkDelegate> network_delegate_; |
| 247 scoped_refptr<CookieStore> cookie_store_; | 254 scoped_refptr<CookieStore> cookie_store_; |
| 248 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 255 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 249 std::vector<SchemeFactory> extra_http_auth_handlers_; | 256 std::vector<SchemeFactory> extra_http_auth_handlers_; |
| 250 ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 257 ScopedVector<URLRequestInterceptor> url_request_interceptors_; |
| 258 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 251 | 259 |
| 252 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 260 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 253 }; | 261 }; |
| 254 | 262 |
| 255 } // namespace net | 263 } // namespace net |
| 256 | 264 |
| 257 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 265 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |