Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: net/disk_cache/simple/simple_index.h

Issue 1401053004: Revert of Implement cache counting for the simple and memory backends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.cc ('k') | net/disk_cache/simple/simple_index.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_SIMPLE_SIMPLE_INDEX_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // disk cache backend interface. 123 // disk cache backend interface.
124 scoped_ptr<HashList> GetEntriesBetween(const base::Time initial_time, 124 scoped_ptr<HashList> GetEntriesBetween(const base::Time initial_time,
125 const base::Time end_time); 125 const base::Time end_time);
126 126
127 // Returns the list of all entries key hash. 127 // Returns the list of all entries key hash.
128 scoped_ptr<HashList> GetAllHashes(); 128 scoped_ptr<HashList> GetAllHashes();
129 129
130 // Returns number of indexed entries. 130 // Returns number of indexed entries.
131 int32 GetEntryCount() const; 131 int32 GetEntryCount() const;
132 132
133 // Returns the size of the entire cache in bytes. Can only be called after the
134 // index has been initialized.
135 uint64 GetCacheSize() const;
136
137 // Returns whether the index has been initialized yet. 133 // Returns whether the index has been initialized yet.
138 bool initialized() const { return initialized_; } 134 bool initialized() const { return initialized_; }
139 135
140 private: 136 private:
141 friend class SimpleIndexTest; 137 friend class SimpleIndexTest;
142 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, IndexSizeCorrectOnMerge); 138 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, IndexSizeCorrectOnMerge);
143 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWriteQueued); 139 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWriteQueued);
144 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWriteExecuted); 140 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWriteExecuted);
145 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWritePostponed); 141 FRIEND_TEST_ALL_PREFIXES(SimpleIndexTest, DiskWritePostponed);
146 142
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 195
200 // Set to true when the app is on the background. When the app is in the 196 // Set to true when the app is on the background. When the app is in the
201 // background we can write the index much more frequently, to insure fresh 197 // background we can write the index much more frequently, to insure fresh
202 // index on next startup. 198 // index on next startup.
203 bool app_on_background_; 199 bool app_on_background_;
204 }; 200 };
205 201
206 } // namespace disk_cache 202 } // namespace disk_cache
207 203
208 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_ 204 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.cc ('k') | net/disk_cache/simple/simple_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698