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

Side by Side Diff: net/disk_cache/blockfile/backend_impl.h

Issue 2626173003: Calculate the size of all cache entries between two points in time. (Closed)
Patch Set: fix unit_tests compilation Created 3 years, 11 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
OLDNEW
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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 const CompletionCallback& callback) override; 275 const CompletionCallback& callback) override;
276 int DoomEntry(const std::string& key, 276 int DoomEntry(const std::string& key,
277 const CompletionCallback& callback) override; 277 const CompletionCallback& callback) override;
278 int DoomAllEntries(const CompletionCallback& callback) override; 278 int DoomAllEntries(const CompletionCallback& callback) override;
279 int DoomEntriesBetween(base::Time initial_time, 279 int DoomEntriesBetween(base::Time initial_time,
280 base::Time end_time, 280 base::Time end_time,
281 const CompletionCallback& callback) override; 281 const CompletionCallback& callback) override;
282 int DoomEntriesSince(base::Time initial_time, 282 int DoomEntriesSince(base::Time initial_time,
283 const CompletionCallback& callback) override; 283 const CompletionCallback& callback) override;
284 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override; 284 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
285 int CalculateSizeOfEntriesBetween(
286 base::Time initial_time,
287 base::Time end_time,
288 const CompletionCallback& callback) override;
289
285 // NOTE: The blockfile Backend::Iterator::OpenNextEntry method does not modify 290 // NOTE: The blockfile Backend::Iterator::OpenNextEntry method does not modify
286 // the last_used field of the entry, and therefore it does not impact the 291 // the last_used field of the entry, and therefore it does not impact the
287 // eviction ranking of the entry. However, an enumeration will go through all 292 // eviction ranking of the entry. However, an enumeration will go through all
288 // entries on the cache only if the cache is not modified while the 293 // entries on the cache only if the cache is not modified while the
289 // enumeration is taking place. Significantly altering the entry pointed by 294 // enumeration is taking place. Significantly altering the entry pointed by
290 // the iterator (for example, deleting the entry) will invalidate the 295 // the iterator (for example, deleting the entry) will invalidate the
291 // iterator. Performing operations on an entry that modify the entry may 296 // iterator. Performing operations on an entry that modify the entry may
292 // result in loops in the iteration, skipped entries or similar. 297 // result in loops in the iteration, skipped entries or similar.
293 std::unique_ptr<Iterator> CreateIterator() override; 298 std::unique_ptr<Iterator> CreateIterator() override;
294 void GetStats(StatsItems* stats) override; 299 void GetStats(StatsItems* stats) override;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 base::WaitableEvent done_; // Signals the end of background work. 414 base::WaitableEvent done_; // Signals the end of background work.
410 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. 415 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing.
411 base::WeakPtrFactory<BackendImpl> ptr_factory_; 416 base::WeakPtrFactory<BackendImpl> ptr_factory_;
412 417
413 DISALLOW_COPY_AND_ASSIGN(BackendImpl); 418 DISALLOW_COPY_AND_ASSIGN(BackendImpl);
414 }; 419 };
415 420
416 } // namespace disk_cache 421 } // namespace disk_cache
417 422
418 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 423 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698