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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ProxyService* proxy_service, | 124 ProxyService* proxy_service, |
125 SSLConfigService* ssl_config_service, | 125 SSLConfigService* ssl_config_service, |
126 HttpAuthHandlerFactory* http_auth_handler_factory, | 126 HttpAuthHandlerFactory* http_auth_handler_factory, |
127 HttpNetworkDelegate* network_delegate, | 127 HttpNetworkDelegate* network_delegate, |
128 NetLog* net_log, | 128 NetLog* net_log, |
129 BackendFactory* backend_factory); | 129 BackendFactory* backend_factory); |
130 | 130 |
131 // The disk cache is initialized lazily (by CreateTransaction) in this case. | 131 // The disk cache is initialized lazily (by CreateTransaction) in this case. |
132 // Provide an existing HttpNetworkSession, the cache can construct a | 132 // Provide an existing HttpNetworkSession, the cache can construct a |
133 // network layer with a shared HttpNetworkSession in order for multiple | 133 // network layer with a shared HttpNetworkSession in order for multiple |
134 // network layers to share information (e.g. authenication data). The | 134 // network layers to share information (e.g. authentication data). The |
135 // HttpCache takes ownership of the |backend_factory|. | 135 // HttpCache takes ownership of the |backend_factory|. |
136 HttpCache(HttpNetworkSession* session, BackendFactory* backend_factory); | 136 HttpCache(HttpNetworkSession* session, BackendFactory* backend_factory); |
137 | 137 |
138 // Initialize the cache from its component parts, which is useful for | 138 // Initialize the cache from its component parts, which is useful for |
139 // testing. The lifetime of the network_layer and backend_factory are managed | 139 // testing. The lifetime of the network_layer and backend_factory are managed |
140 // by the HttpCache and will be destroyed using |delete| when the HttpCache is | 140 // by the HttpCache and will be destroyed using |delete| when the HttpCache is |
141 // destroyed. | 141 // destroyed. |
142 HttpCache(HttpTransactionFactory* network_layer, | 142 HttpCache(HttpTransactionFactory* network_layer, |
143 NetLog* net_log, | 143 NetLog* net_log, |
144 BackendFactory* backend_factory); | 144 BackendFactory* backend_factory); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 ScopedRunnableMethodFactory<HttpCache> task_factory_; | 373 ScopedRunnableMethodFactory<HttpCache> task_factory_; |
374 | 374 |
375 scoped_ptr<PlaybackCacheMap> playback_cache_map_; | 375 scoped_ptr<PlaybackCacheMap> playback_cache_map_; |
376 | 376 |
377 DISALLOW_COPY_AND_ASSIGN(HttpCache); | 377 DISALLOW_COPY_AND_ASSIGN(HttpCache); |
378 }; | 378 }; |
379 | 379 |
380 } // namespace net | 380 } // namespace net |
381 | 381 |
382 #endif // NET_HTTP_HTTP_CACHE_H_ | 382 #endif // NET_HTTP_HTTP_CACHE_H_ |
OLD | NEW |