Chromium Code Reviews| Index: net/disk_cache/disk_cache.h |
| diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h |
| index 84c1ee99516654258486494a8afeacfb70ddc31d..b7a298a9aa5d5d0601c18826ea2be3c47c7b0b36 100644 |
| --- a/net/disk_cache/disk_cache.h |
| +++ b/net/disk_cache/disk_cache.h |
| @@ -145,6 +145,16 @@ class NET_EXPORT Backend { |
| virtual int DoomEntriesSince(base::Time initial_time, |
| const CompletionCallback& callback) = 0; |
| + // Calculate the total size of entries satisfying the condition |
| + // |initial_time| <= access_time < |end_time|. The return value is the number |
| + // of bytes written or a net error code. 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) = 0; |
| + |
| // Returns an iterator which will enumerate all entries of the cache in an |
| // undefined order. |
| virtual scoped_ptr<Iterator> CreateIterator() = 0; |
| @@ -183,6 +193,10 @@ class NET_EXPORT Entry { |
| // Returns the size of the cache data with the given index. |
| virtual int32 GetDataSize(int index) const = 0; |
| + // Returns the total size of this entry, a sum of the cached data for each |
| + // valid index. |
| + virtual int GetEntrySize() const = 0; |
|
pasko
2015/09/04 14:11:50
I think it is a _bad_ interface to use for calcula
msramek
2015/09/04 16:56:47
Makes sense. I removed GetEntrySize from everywher
|
| + |
| // Copies cached data into the given buffer of length |buf_len|. Returns the |
| // number of bytes read or a network error code. If this function returns |
| // ERR_IO_PENDING, the completion callback will be called on the current |