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_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 "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "net/disk_cache/disk_cache.h" | 9 #include "net/disk_cache/disk_cache.h" |
10 #include "net/disk_cache/storage_block.h" | 10 #include "net/disk_cache/storage_block.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Handle the pending asynchronous IO count. | 106 // Handle the pending asynchronous IO count. |
107 void IncrementIoCount(); | 107 void IncrementIoCount(); |
108 void DecrementIoCount(); | 108 void DecrementIoCount(); |
109 | 109 |
110 // Set the access times for this entry. This method provides support for | 110 // Set the access times for this entry. This method provides support for |
111 // the upgrade tool. | 111 // the upgrade tool. |
112 void SetTimes(base::Time last_used, base::Time last_modified); | 112 void SetTimes(base::Time last_used, base::Time last_modified); |
113 | 113 |
114 // Generates a histogram for the time spent working on this operation. | 114 // Generates a histogram for the time spent working on this operation. |
115 void ReportIOTime(Operation op, const base::Time& start); | 115 void ReportIOTime(Operation op, const base::TimeTicks& start); |
116 | 116 |
117 private: | 117 private: |
118 enum { | 118 enum { |
119 kNumStreams = 3 | 119 kNumStreams = 3 |
120 }; | 120 }; |
121 | 121 |
122 ~EntryImpl(); | 122 ~EntryImpl(); |
123 | 123 |
124 // Initializes the storage for an internal or external data block. | 124 // Initializes the storage for an internal or external data block. |
125 bool CreateDataBlock(int index, int size); | 125 bool CreateDataBlock(int index, int size); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. | 188 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. |
189 bool doomed_; // True if this entry was removed from the cache. | 189 bool doomed_; // True if this entry was removed from the cache. |
190 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. | 190 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. |
191 | 191 |
192 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); | 192 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace disk_cache | 195 } // namespace disk_cache |
196 | 196 |
197 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ | 197 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ |
OLD | NEW |