| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return doomed_; | 97 return doomed_; |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Marks this entry as dirty (in memory) if needed. This is intended only for | 100 // Marks this entry as dirty (in memory) if needed. This is intended only for |
| 101 // entries that are being read from disk, to be called during loading. | 101 // entries that are being read from disk, to be called during loading. |
| 102 void SetDirtyFlag(int32 current_id); | 102 void SetDirtyFlag(int32 current_id); |
| 103 | 103 |
| 104 // Fixes this entry so it can be treated as valid (to delete it). | 104 // Fixes this entry so it can be treated as valid (to delete it). |
| 105 void SetPointerForInvalidEntry(int32 new_id); | 105 void SetPointerForInvalidEntry(int32 new_id); |
| 106 | 106 |
| 107 // Returns true if this entry is so meesed up that not everything is going to |
| 108 // be removed. |
| 109 bool LeaveRankingsBehind(); |
| 110 |
| 107 // Returns false if the entry is clearly invalid. | 111 // Returns false if the entry is clearly invalid. |
| 108 bool SanityCheck(); | 112 bool SanityCheck(); |
| 113 bool DataSanityCheck(); |
| 114 |
| 115 // Attempts to make this entry reachable though the key. |
| 116 void FixForDelete(); |
| 109 | 117 |
| 110 // Handle the pending asynchronous IO count. | 118 // Handle the pending asynchronous IO count. |
| 111 void IncrementIoCount(); | 119 void IncrementIoCount(); |
| 112 void DecrementIoCount(); | 120 void DecrementIoCount(); |
| 113 | 121 |
| 114 // Set the access times for this entry. This method provides support for | 122 // Set the access times for this entry. This method provides support for |
| 115 // the upgrade tool. | 123 // the upgrade tool. |
| 116 void SetTimes(base::Time last_used, base::Time last_modified); | 124 void SetTimes(base::Time last_used, base::Time last_modified); |
| 117 | 125 |
| 118 // Generates a histogram for the time spent working on this operation. | 126 // Generates a histogram for the time spent working on this operation. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. | 259 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. |
| 252 | 260 |
| 253 net::BoundNetLog net_log_; | 261 net::BoundNetLog net_log_; |
| 254 | 262 |
| 255 DISALLOW_COPY_AND_ASSIGN(EntryImpl); | 263 DISALLOW_COPY_AND_ASSIGN(EntryImpl); |
| 256 }; | 264 }; |
| 257 | 265 |
| 258 } // namespace disk_cache | 266 } // namespace disk_cache |
| 259 | 267 |
| 260 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ | 268 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ |
| OLD | NEW |