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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class HttpAuthHandlerFactory; | 45 class HttpAuthHandlerFactory; |
46 class HttpServerProperties; | 46 class HttpServerProperties; |
47 class ProxyConfigService; | 47 class ProxyConfigService; |
48 class URLRequestContext; | 48 class URLRequestContext; |
49 class URLRequestInterceptor; | 49 class URLRequestInterceptor; |
50 | 50 |
51 class NET_EXPORT URLRequestContextBuilder { | 51 class NET_EXPORT URLRequestContextBuilder { |
52 public: | 52 public: |
53 struct NET_EXPORT HttpCacheParams { | 53 struct NET_EXPORT HttpCacheParams { |
54 enum Type { | 54 enum Type { |
| 55 // In-memory cache. |
55 IN_MEMORY, | 56 IN_MEMORY, |
| 57 // Disk cache using "default" backend. |
56 DISK, | 58 DISK, |
| 59 // Disk cache using "simple" backend (SimpleBackendImpl). |
| 60 DISK_SIMPLE, |
57 }; | 61 }; |
58 | 62 |
59 HttpCacheParams(); | 63 HttpCacheParams(); |
60 ~HttpCacheParams(); | 64 ~HttpCacheParams(); |
61 | 65 |
62 // The type of HTTP cache. Default is IN_MEMORY. | 66 // The type of HTTP cache. Default is IN_MEMORY. |
63 Type type; | 67 Type type; |
64 | 68 |
65 // The max size of the cache in bytes. Default is algorithmically determined | 69 // The max size of the cache in bytes. Default is algorithmically determined |
66 // based off available disk space. | 70 // based off available disk space. |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 scoped_ptr<CertVerifier> cert_verifier_; | 277 scoped_ptr<CertVerifier> cert_verifier_; |
274 ScopedVector<URLRequestInterceptor> url_request_interceptors_; | 278 ScopedVector<URLRequestInterceptor> url_request_interceptors_; |
275 scoped_ptr<HttpServerProperties> http_server_properties_; | 279 scoped_ptr<HttpServerProperties> http_server_properties_; |
276 | 280 |
277 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 281 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
278 }; | 282 }; |
279 | 283 |
280 } // namespace net | 284 } // namespace net |
281 | 285 |
282 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 286 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |