| Index: net/disk_cache/disk_cache.h
|
| diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
|
| index f71bc81964b929f4dce5596d724c41bf36429279..09924065c4b7bc39be9b031246e9456a0042b888 100644
|
| --- a/net/disk_cache/disk_cache.h
|
| +++ b/net/disk_cache/disk_cache.h
|
| @@ -19,6 +19,7 @@
|
| #include "base/time/time.h"
|
| #include "net/base/cache_type.h"
|
| #include "net/base/completion_callback.h"
|
| +#include "net/base/net_errors.h"
|
| #include "net/base/net_export.h"
|
|
|
| namespace base {
|
| @@ -149,8 +150,19 @@ class NET_EXPORT Backend {
|
| // Calculate the total size of the cache. The return value is the size in
|
| // bytes or a net error code. If this method returns ERR_IO_PENDING,
|
| // the |callback| will be invoked when the operation completes.
|
| - virtual int CalculateSizeOfAllEntries(
|
| - const CompletionCallback& callback) = 0;
|
| + virtual int CalculateSizeOfAllEntries(const CompletionCallback& callback) = 0;
|
| +
|
| + // Calculate the size of all cache entries accessed between |initial_time| and
|
| + // |end_time|.
|
| + // The return value is the size in bytes or a net error code. The default
|
| + // implementation returns ERR_NOT_IMPLEMENTED and should only be overwritten
|
| + // if there is an efficient way for the backend to determine the size for a
|
| + // subset of the cache without reading the whole cache from disk.
|
| + // If this method returns ERR_IO_PENDING, the |callback| will be invoked when
|
| + // the operation completes.
|
| + virtual int CalculateSizeOfEntriesBetween(base::Time initial_time,
|
| + base::Time end_time,
|
| + const CompletionCallback& callback);
|
|
|
| // Returns an iterator which will enumerate all entries of the cache in an
|
| // undefined order.
|
|
|