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 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 7234 (any exceptions are called out in the code). | 7 // caching logic follows RFC 7234 (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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 kMetadataIndex, | 239 kMetadataIndex, |
240 | 240 |
241 // Must remain at the end of the enum. | 241 // Must remain at the end of the enum. |
242 kNumCacheEntryDataIndices | 242 kNumCacheEntryDataIndices |
243 }; | 243 }; |
244 | 244 |
245 class MetadataWriter; | 245 class MetadataWriter; |
246 class QuicServerInfoFactoryAdaptor; | 246 class QuicServerInfoFactoryAdaptor; |
247 class Transaction; | 247 class Transaction; |
248 class WorkItem; | 248 class WorkItem; |
| 249 class Writers; |
| 250 friend class WritersTest; // To access ActiveEntry in the test class. |
| 251 friend class MockHttpCacheTransaction; |
249 friend class Transaction; | 252 friend class Transaction; |
250 friend class ViewCacheHelper; | 253 friend class ViewCacheHelper; |
251 struct PendingOp; // Info for an entry under construction. | 254 struct PendingOp; // Info for an entry under construction. |
252 | 255 |
253 // To help with testing. | 256 // To help with testing. |
254 friend class MockHttpCache; | 257 friend class MockHttpCache; |
255 | 258 |
256 using TransactionList = std::list<Transaction*>; | 259 using TransactionList = std::list<Transaction*>; |
257 using TransactionSet = std::unordered_set<Transaction*>; | 260 using TransactionSet = std::unordered_set<Transaction*>; |
258 typedef std::list<std::unique_ptr<WorkItem>> WorkItemList; | 261 typedef std::list<std::unique_ptr<WorkItem>> WorkItemList; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 THREAD_CHECKER(thread_checker_); | 553 THREAD_CHECKER(thread_checker_); |
551 | 554 |
552 base::WeakPtrFactory<HttpCache> weak_factory_; | 555 base::WeakPtrFactory<HttpCache> weak_factory_; |
553 | 556 |
554 DISALLOW_COPY_AND_ASSIGN(HttpCache); | 557 DISALLOW_COPY_AND_ASSIGN(HttpCache); |
555 }; | 558 }; |
556 | 559 |
557 } // namespace net | 560 } // namespace net |
558 | 561 |
559 #endif // NET_HTTP_HTTP_CACHE_H_ | 562 #endif // NET_HTTP_HTTP_CACHE_H_ |
OLD | NEW |