OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 file declares a HttpTransactionFactory implementation that can be | 5 // This file declares a HttpTransactionFactory implementation that can be |
6 // layered on top of another HttpTransactionFactory to add HTTP caching. The | 6 // layered on top of another HttpTransactionFactory to add HTTP caching. The |
7 // caching logic follows RFC 2616 (any exceptions are called out in the code). | 7 // caching logic follows RFC 2616 (any exceptions are called out in the code). |
8 // | 8 // |
9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for | 9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for |
10 // the cache storage. | 10 // the cache storage. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class DnsCertProvenanceChecker; | 46 class DnsCertProvenanceChecker; |
47 class DnsRRResolver; | 47 class DnsRRResolver; |
48 class HostResolver; | 48 class HostResolver; |
49 class HttpAuthHandlerFactory; | 49 class HttpAuthHandlerFactory; |
50 class HttpNetworkSession; | 50 class HttpNetworkSession; |
51 struct HttpRequestInfo; | 51 struct HttpRequestInfo; |
52 class HttpResponseInfo; | 52 class HttpResponseInfo; |
53 class IOBuffer; | 53 class IOBuffer; |
54 class NetLog; | 54 class NetLog; |
55 class NetworkDelegate; | 55 class NetworkDelegate; |
| 56 class OriginBoundCertService; |
56 class ProxyService; | 57 class ProxyService; |
57 class SSLConfigService; | 58 class SSLConfigService; |
58 class ViewCacheHelper; | 59 class ViewCacheHelper; |
59 | 60 |
60 class NET_API HttpCache : public HttpTransactionFactory, | 61 class NET_API HttpCache : public HttpTransactionFactory, |
61 public base::SupportsWeakPtr<HttpCache>, | 62 public base::SupportsWeakPtr<HttpCache>, |
62 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 63 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
63 public: | 64 public: |
64 // The cache mode of operation. | 65 // The cache mode of operation. |
65 enum Mode { | 66 enum Mode { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 CacheType type_; | 114 CacheType type_; |
114 const FilePath path_; | 115 const FilePath path_; |
115 int max_bytes_; | 116 int max_bytes_; |
116 scoped_refptr<base::MessageLoopProxy> thread_; | 117 scoped_refptr<base::MessageLoopProxy> thread_; |
117 }; | 118 }; |
118 | 119 |
119 // The disk cache is initialized lazily (by CreateTransaction) in this case. | 120 // The disk cache is initialized lazily (by CreateTransaction) in this case. |
120 // The HttpCache takes ownership of the |backend_factory|. | 121 // The HttpCache takes ownership of the |backend_factory|. |
121 HttpCache(HostResolver* host_resolver, | 122 HttpCache(HostResolver* host_resolver, |
122 CertVerifier* cert_verifier, | 123 CertVerifier* cert_verifier, |
| 124 OriginBoundCertService* origin_bound_cert_service, |
123 DnsRRResolver* dnsrr_resolver, | 125 DnsRRResolver* dnsrr_resolver, |
124 DnsCertProvenanceChecker* dns_cert_checker, | 126 DnsCertProvenanceChecker* dns_cert_checker, |
125 ProxyService* proxy_service, | 127 ProxyService* proxy_service, |
126 SSLConfigService* ssl_config_service, | 128 SSLConfigService* ssl_config_service, |
127 HttpAuthHandlerFactory* http_auth_handler_factory, | 129 HttpAuthHandlerFactory* http_auth_handler_factory, |
128 NetworkDelegate* network_delegate, | 130 NetworkDelegate* network_delegate, |
129 NetLog* net_log, | 131 NetLog* net_log, |
130 BackendFactory* backend_factory); | 132 BackendFactory* backend_factory); |
131 | 133 |
132 // The disk cache is initialized lazily (by CreateTransaction) in this case. | 134 // The disk cache is initialized lazily (by CreateTransaction) in this case. |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 ScopedRunnableMethodFactory<HttpCache> task_factory_; | 375 ScopedRunnableMethodFactory<HttpCache> task_factory_; |
374 | 376 |
375 scoped_ptr<PlaybackCacheMap> playback_cache_map_; | 377 scoped_ptr<PlaybackCacheMap> playback_cache_map_; |
376 | 378 |
377 DISALLOW_COPY_AND_ASSIGN(HttpCache); | 379 DISALLOW_COPY_AND_ASSIGN(HttpCache); |
378 }; | 380 }; |
379 | 381 |
380 } // namespace net | 382 } // namespace net |
381 | 383 |
382 #endif // NET_HTTP_HTTP_CACHE_H_ | 384 #endif // NET_HTTP_HTTP_CACHE_H_ |
OLD | NEW |