| 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 #ifndef NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ |
| 6 #define NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ | 6 #define NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <unordered_map> | 12 #include <unordered_map> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/containers/linked_list.h" | 15 #include "base/containers/linked_list.h" |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "net/disk_cache/disk_cache.h" | 19 #include "net/disk_cache/disk_cache.h" |
| 20 #include "net/log/net_log.h" | 20 #include "net/log/net_log_with_source.h" |
| 21 |
| 22 namespace net { |
| 23 class NetLog; |
| 24 } |
| 21 | 25 |
| 22 namespace disk_cache { | 26 namespace disk_cache { |
| 23 | 27 |
| 24 class MemBackendImpl; | 28 class MemBackendImpl; |
| 25 | 29 |
| 26 // This class implements the Entry interface for the memory-only cache. An | 30 // This class implements the Entry interface for the memory-only cache. An |
| 27 // object of this class represents a single entry on the cache. We use two types | 31 // object of this class represents a single entry on the cache. We use two types |
| 28 // of entries, parent and child to support sparse caching. | 32 // of entries, parent and child to support sparse caching. |
| 29 // | 33 // |
| 30 // A parent entry is non-sparse until a sparse method is invoked (i.e. | 34 // A parent entry is non-sparse until a sparse method is invoked (i.e. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 bool doomed_; // True if this entry was removed from the cache. | 184 bool doomed_; // True if this entry was removed from the cache. |
| 181 | 185 |
| 182 net::NetLogWithSource net_log_; | 186 net::NetLogWithSource net_log_; |
| 183 | 187 |
| 184 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); | 188 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); |
| 185 }; | 189 }; |
| 186 | 190 |
| 187 } // namespace disk_cache | 191 } // namespace disk_cache |
| 188 | 192 |
| 189 #endif // NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ | 193 #endif // NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ |
| OLD | NEW |