OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_MEM_ENTRY_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "net/disk_cache/disk_cache.h" | 10 #include "net/disk_cache/disk_cache.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int FindNextChild(int64 offset, int len, MemEntryImpl** child); | 135 int FindNextChild(int64 offset, int len, MemEntryImpl** child); |
136 | 136 |
137 // Removes child indexed by |child_id| from the children map. | 137 // Removes child indexed by |child_id| from the children map. |
138 void DetachChild(int child_id); | 138 void DetachChild(int child_id); |
139 | 139 |
140 std::string key_; | 140 std::string key_; |
141 std::vector<char> data_[NUM_STREAMS]; // User data. | 141 std::vector<char> data_[NUM_STREAMS]; // User data. |
142 int32 data_size_[NUM_STREAMS]; | 142 int32 data_size_[NUM_STREAMS]; |
143 int ref_count_; | 143 int ref_count_; |
144 | 144 |
145 MemEntryImpl* next_; // Pointers for the LRU list. | 145 int child_id_; // The ID of a child entry. |
| 146 int child_first_pos_; // The position of the first byte in a child |
| 147 // entry. |
| 148 MemEntryImpl* next_; // Pointers for the LRU list. |
146 MemEntryImpl* prev_; | 149 MemEntryImpl* prev_; |
147 MemEntryImpl* parent_; // Pointer to the parent entry. | 150 MemEntryImpl* parent_; // Pointer to the parent entry. |
148 scoped_ptr<EntryMap> children_; | 151 scoped_ptr<EntryMap> children_; |
149 | 152 |
150 int child_id_; // The ID of a child entry. | 153 base::Time last_modified_; // LRU information. |
151 int child_first_pos_; // The position of the first byte in a child | |
152 // entry. | |
153 | |
154 base::Time last_modified_; // LRU information. | |
155 base::Time last_used_; | 154 base::Time last_used_; |
156 MemBackendImpl* backend_; // Back pointer to the cache. | 155 MemBackendImpl* backend_; // Back pointer to the cache. |
157 bool doomed_; // True if this entry was removed from the cache. | 156 bool doomed_; // True if this entry was removed from the cache. |
158 | 157 |
159 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); | 158 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); |
160 }; | 159 }; |
161 | 160 |
162 } // namespace disk_cache | 161 } // namespace disk_cache |
163 | 162 |
164 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 163 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
OLD | NEW |