Index: net/disk_cache/blockfile/in_flight_backend_io.cc |
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.cc b/net/disk_cache/blockfile/in_flight_backend_io.cc |
index 28d7114ba610313a76a4878a3d1460f2c1cacd64..541681da40b7510ae19c110d1c0964de0dc60532 100644 |
--- a/net/disk_cache/blockfile/in_flight_backend_io.cc |
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc |
@@ -115,6 +115,13 @@ void BackendIO::DoomEntriesSince(const base::Time initial_time) { |
initial_time_ = initial_time; |
} |
+void BackendIO::CalculateSizeOfEntriesBetween(const base::Time initial_time, |
+ const base::Time end_time) { |
+ operation_ = OP_SIZE_BETWEEN; |
+ initial_time_ = initial_time; |
+ end_time_ = end_time; |
+} |
+ |
void BackendIO::OpenNextEntry(Rankings::Iterator* iterator, |
Entry** next_entry) { |
operation_ = OP_OPEN_NEXT; |
@@ -244,6 +251,10 @@ void BackendIO::ExecuteBackendOperation() { |
case OP_DOOM_SINCE: |
result_ = backend_->SyncDoomEntriesSince(initial_time_); |
break; |
+ case OP_SIZE_BETWEEN: |
+ result_ = backend_->SyncCalculateSizeOfEntriesBetween( |
+ initial_time_, end_time_); |
+ break; |
case OP_OPEN_NEXT: |
result_ = backend_->SyncOpenNextEntry(iterator_, entry_ptr_); |
break; |
@@ -382,6 +393,15 @@ void InFlightBackendIO::DoomEntriesSince( |
PostOperation(operation.get()); |
} |
+void InFlightBackendIO::CalculateSizeOfEntriesBetween( |
+ const base::Time initial_time, |
+ const base::Time end_time, |
+ const net::CompletionCallback& callback) { |
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); |
+ operation->CalculateSizeOfEntriesBetween(initial_time, end_time); |
+ PostOperation(operation.get()); |
+} |
+ |
void InFlightBackendIO::OpenNextEntry(Rankings::Iterator* iterator, |
Entry** next_entry, |
const net::CompletionCallback& callback) { |