| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void SlowDeactivateEntry(ActiveEntry* entry); | 169 void SlowDeactivateEntry(ActiveEntry* entry); |
| 170 ActiveEntry* OpenEntry(const std::string& key); | 170 ActiveEntry* OpenEntry(const std::string& key); |
| 171 ActiveEntry* CreateEntry(const std::string& cache_key); | 171 ActiveEntry* CreateEntry(const std::string& cache_key); |
| 172 void DestroyEntry(ActiveEntry* entry); | 172 void DestroyEntry(ActiveEntry* entry); |
| 173 int AddTransactionToEntry(ActiveEntry* entry, Transaction* trans); | 173 int AddTransactionToEntry(ActiveEntry* entry, Transaction* trans); |
| 174 void DoneWithEntry(ActiveEntry* entry, Transaction* trans, bool cancel); | 174 void DoneWithEntry(ActiveEntry* entry, Transaction* trans, bool cancel); |
| 175 void DoneWritingToEntry(ActiveEntry* entry, bool success); | 175 void DoneWritingToEntry(ActiveEntry* entry, bool success); |
| 176 void DoneReadingFromEntry(ActiveEntry* entry, Transaction* trans); | 176 void DoneReadingFromEntry(ActiveEntry* entry, Transaction* trans); |
| 177 void ConvertWriterToReader(ActiveEntry* entry); | 177 void ConvertWriterToReader(ActiveEntry* entry); |
| 178 void RemovePendingTransaction(Transaction* trans); | 178 void RemovePendingTransaction(Transaction* trans); |
| 179 bool RemovePendingTransactionFromEntry(ActiveEntry* entry, |
| 180 Transaction* trans); |
| 179 void ProcessPendingQueue(ActiveEntry* entry); | 181 void ProcessPendingQueue(ActiveEntry* entry); |
| 180 | 182 |
| 181 | 183 |
| 182 // Events (called via PostTask) --------------------------------------------- | 184 // Events (called via PostTask) --------------------------------------------- |
| 183 | 185 |
| 184 void OnProcessPendingQueue(ActiveEntry* entry); | 186 void OnProcessPendingQueue(ActiveEntry* entry); |
| 185 | 187 |
| 186 | 188 |
| 187 // Variables ---------------------------------------------------------------- | 189 // Variables ---------------------------------------------------------------- |
| 188 | 190 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 209 | 211 |
| 210 typedef base::hash_map<std::string, int> PlaybackCacheMap; | 212 typedef base::hash_map<std::string, int> PlaybackCacheMap; |
| 211 scoped_ptr<PlaybackCacheMap> playback_cache_map_; | 213 scoped_ptr<PlaybackCacheMap> playback_cache_map_; |
| 212 | 214 |
| 213 DISALLOW_COPY_AND_ASSIGN(HttpCache); | 215 DISALLOW_COPY_AND_ASSIGN(HttpCache); |
| 214 }; | 216 }; |
| 215 | 217 |
| 216 } // namespace net | 218 } // namespace net |
| 217 | 219 |
| 218 #endif // NET_HTTP_HTTP_CACHE_H_ | 220 #endif // NET_HTTP_HTTP_CACHE_H_ |
| OLD | NEW |