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_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/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 void set_prev(MemEntryImpl* prev) { | 77 void set_prev(MemEntryImpl* prev) { |
78 prev_ = prev; | 78 prev_ = prev; |
79 } | 79 } |
80 | 80 |
81 EntryType type() const { | 81 EntryType type() const { |
82 return parent_ ? kChildEntry : kParentEntry; | 82 return parent_ ? kChildEntry : kParentEntry; |
83 } | 83 } |
84 | 84 |
85 std::string& key() { | 85 const net::BoundNetLog& net_log() { |
86 return key_; | |
87 } | |
88 | |
89 net::BoundNetLog& net_log() { | |
90 return net_log_; | 86 return net_log_; |
91 } | 87 } |
92 | 88 |
93 // Entry interface. | 89 // Entry interface. |
94 virtual void Doom() OVERRIDE; | 90 virtual void Doom() OVERRIDE; |
95 virtual void Close() OVERRIDE; | 91 virtual void Close() OVERRIDE; |
96 virtual std::string GetKey() const OVERRIDE; | 92 virtual std::string GetKey() const OVERRIDE; |
97 virtual base::Time GetLastUsed() const OVERRIDE; | 93 virtual base::Time GetLastUsed() const OVERRIDE; |
98 virtual base::Time GetLastModified() const OVERRIDE; | 94 virtual base::Time GetLastModified() const OVERRIDE; |
99 virtual int32 GetDataSize(int index) const OVERRIDE; | 95 virtual int32 GetDataSize(int index) const OVERRIDE; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 bool doomed_; // True if this entry was removed from the cache. | 176 bool doomed_; // True if this entry was removed from the cache. |
181 | 177 |
182 net::BoundNetLog net_log_; | 178 net::BoundNetLog net_log_; |
183 | 179 |
184 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); | 180 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); |
185 }; | 181 }; |
186 | 182 |
187 } // namespace disk_cache | 183 } // namespace disk_cache |
188 | 184 |
189 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 185 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
OLD | NEW |