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..b7fa8a455f147a486e8580bac40e6d7fa24336ba 100644 |
--- a/net/disk_cache/blockfile/in_flight_backend_io.cc |
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc |
@@ -115,6 +115,10 @@ void BackendIO::DoomEntriesSince(const base::Time initial_time) { |
initial_time_ = initial_time; |
} |
+void BackendIO::CalculateSizeOfAllEntries() { |
+ operation_ = OP_SIZE_ALL; |
+} |
+ |
void BackendIO::OpenNextEntry(Rankings::Iterator* iterator, |
Entry** next_entry) { |
operation_ = OP_OPEN_NEXT; |
@@ -244,6 +248,9 @@ void BackendIO::ExecuteBackendOperation() { |
case OP_DOOM_SINCE: |
result_ = backend_->SyncDoomEntriesSince(initial_time_); |
break; |
+ case OP_SIZE_ALL: |
+ result_ = backend_->SyncCalculateSizeOfAllEntries(); |
+ break; |
case OP_OPEN_NEXT: |
result_ = backend_->SyncOpenNextEntry(iterator_, entry_ptr_); |
break; |
@@ -375,6 +382,13 @@ void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time, |
PostOperation(operation.get()); |
} |
+void InFlightBackendIO::CalculateSizeOfAllEntries( |
+ const net::CompletionCallback& callback) { |
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); |
+ operation->CalculateSizeOfAllEntries(); |
+ PostOperation(operation.get()); |
+} |
+ |
void InFlightBackendIO::DoomEntriesSince( |
const base::Time initial_time, const net::CompletionCallback& callback) { |
scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback)); |