| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 class GURL; | 35 class GURL; |
| 36 | 36 |
| 37 namespace disk_cache { | 37 namespace disk_cache { |
| 38 class Backend; | 38 class Backend; |
| 39 class Entry; | 39 class Entry; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace net { | 42 namespace net { |
| 43 | 43 |
| 44 class CertVerifier; |
| 44 class DnsCertProvenanceChecker; | 45 class DnsCertProvenanceChecker; |
| 45 class DnsRRResolver; | 46 class DnsRRResolver; |
| 46 class HostResolver; | 47 class HostResolver; |
| 47 class HttpAuthHandlerFactory; | 48 class HttpAuthHandlerFactory; |
| 48 class HttpNetworkDelegate; | 49 class HttpNetworkDelegate; |
| 49 class HttpNetworkSession; | 50 class HttpNetworkSession; |
| 50 struct HttpRequestInfo; | 51 struct HttpRequestInfo; |
| 51 class HttpResponseInfo; | 52 class HttpResponseInfo; |
| 52 class IOBuffer; | 53 class IOBuffer; |
| 53 class NetLog; | 54 class NetLog; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 private: | 111 private: |
| 111 CacheType type_; | 112 CacheType type_; |
| 112 const FilePath path_; | 113 const FilePath path_; |
| 113 int max_bytes_; | 114 int max_bytes_; |
| 114 scoped_refptr<base::MessageLoopProxy> thread_; | 115 scoped_refptr<base::MessageLoopProxy> thread_; |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 // The disk cache is initialized lazily (by CreateTransaction) in this case. | 118 // The disk cache is initialized lazily (by CreateTransaction) in this case. |
| 118 // The HttpCache takes ownership of the |backend_factory|. | 119 // The HttpCache takes ownership of the |backend_factory|. |
| 119 HttpCache(HostResolver* host_resolver, | 120 HttpCache(HostResolver* host_resolver, |
| 121 CertVerifier* cert_verifier, |
| 120 DnsRRResolver* dnsrr_resolver, | 122 DnsRRResolver* dnsrr_resolver, |
| 121 DnsCertProvenanceChecker* dns_cert_checker, | 123 DnsCertProvenanceChecker* dns_cert_checker, |
| 122 ProxyService* proxy_service, | 124 ProxyService* proxy_service, |
| 123 SSLConfigService* ssl_config_service, | 125 SSLConfigService* ssl_config_service, |
| 124 HttpAuthHandlerFactory* http_auth_handler_factory, | 126 HttpAuthHandlerFactory* http_auth_handler_factory, |
| 125 HttpNetworkDelegate* network_delegate, | 127 HttpNetworkDelegate* network_delegate, |
| 126 NetLog* net_log, | 128 NetLog* net_log, |
| 127 BackendFactory* backend_factory); | 129 BackendFactory* backend_factory); |
| 128 | 130 |
| 129 // The disk cache is initialized lazily (by CreateTransaction) in this case. | 131 // The disk cache is initialized lazily (by CreateTransaction) in this case. |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 368 |
| 367 typedef base::hash_map<std::string, int> PlaybackCacheMap; | 369 typedef base::hash_map<std::string, int> PlaybackCacheMap; |
| 368 scoped_ptr<PlaybackCacheMap> playback_cache_map_; | 370 scoped_ptr<PlaybackCacheMap> playback_cache_map_; |
| 369 | 371 |
| 370 DISALLOW_COPY_AND_ASSIGN(HttpCache); | 372 DISALLOW_COPY_AND_ASSIGN(HttpCache); |
| 371 }; | 373 }; |
| 372 | 374 |
| 373 } // namespace net | 375 } // namespace net |
| 374 | 376 |
| 375 #endif // NET_HTTP_HTTP_CACHE_H_ | 377 #endif // NET_HTTP_HTTP_CACHE_H_ |
| OLD | NEW |