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 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H__ | 5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H__ |
6 #define NET_DISK_CACHE_ENTRY_IMPL_H__ | 6 #define NET_DISK_CACHE_ENTRY_IMPL_H__ |
7 | 7 |
8 #include "net/disk_cache/disk_cache.h" | 8 #include "net/disk_cache/disk_cache.h" |
9 #include "net/disk_cache/storage_block.h" | 9 #include "net/disk_cache/storage_block.h" |
10 #include "net/disk_cache/storage_block-inl.h" | 10 #include "net/disk_cache/storage_block-inl.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Fixes this entry so it can be treated as valid (to delete it). | 77 // Fixes this entry so it can be treated as valid (to delete it). |
78 void SetPointerForInvalidEntry(int32 new_id); | 78 void SetPointerForInvalidEntry(int32 new_id); |
79 | 79 |
80 // Returns false if the entry is clearly invalid. | 80 // Returns false if the entry is clearly invalid. |
81 bool SanityCheck(); | 81 bool SanityCheck(); |
82 | 82 |
83 // Handle the pending asynchronous IO count. | 83 // Handle the pending asynchronous IO count. |
84 void IncrementIoCount(); | 84 void IncrementIoCount(); |
85 void DecrementIoCount(); | 85 void DecrementIoCount(); |
86 | 86 |
| 87 // Set the access times for this entry. This method provides support for |
| 88 // the upgrade tool. |
| 89 void SetTimes(base::Time last_used, base::Time last_modified); |
| 90 |
87 private: | 91 private: |
88 ~EntryImpl(); | 92 ~EntryImpl(); |
89 | 93 |
90 // Index for the file used to store the key, if any (files_[kKeyFileIndex]). | 94 // Index for the file used to store the key, if any (files_[kKeyFileIndex]). |
91 static const int kKeyFileIndex = 2; | 95 static const int kKeyFileIndex = 2; |
92 | 96 |
93 // Initializes the storage for an internal or external data block. | 97 // Initializes the storage for an internal or external data block. |
94 bool CreateDataBlock(int index, int size); | 98 bool CreateDataBlock(int index, int size); |
95 | 99 |
96 // Initializes the storage for an internal or external generic block. | 100 // Initializes the storage for an internal or external generic block. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int unreported_size_[2]; // Bytes not reported yet to the backend. | 139 int unreported_size_[2]; // Bytes not reported yet to the backend. |
136 bool doomed_; // True if this entry was removed from the cache. | 140 bool doomed_; // True if this entry was removed from the cache. |
137 | 141 |
138 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); | 142 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); |
139 }; | 143 }; |
140 | 144 |
141 } // namespace disk_cache | 145 } // namespace disk_cache |
142 | 146 |
143 #endif // NET_DISK_CACHE_ENTRY_IMPL_H__ | 147 #endif // NET_DISK_CACHE_ENTRY_IMPL_H__ |
144 | 148 |
OLD | NEW |