Index: net/disk_cache/simple/simple_backend_impl.cc |
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc |
index d1c111eccf0372f7f35338cd6e750bd90dfd048e..f985e58ae89f292cf7c46a6adce8cc296c7d5f88 100644 |
--- a/net/disk_cache/simple/simple_backend_impl.cc |
+++ b/net/disk_cache/simple/simple_backend_impl.cc |
@@ -442,6 +442,19 @@ |
return DoomEntriesBetween(Time(), Time(), callback); |
} |
+void SimpleBackendImpl::IndexReadyForDoom(Time initial_time, |
+ Time end_time, |
+ const CompletionCallback& callback, |
+ int result) { |
+ if (result != net::OK) { |
+ callback.Run(result); |
+ return; |
+ } |
+ scoped_ptr<std::vector<uint64> > removed_key_hashes( |
+ index_->GetEntriesBetween(initial_time, end_time).release()); |
+ DoomEntries(removed_key_hashes.get(), callback); |
+} |
+ |
int SimpleBackendImpl::DoomEntriesBetween( |
const Time initial_time, |
const Time end_time, |
@@ -459,8 +472,8 @@ |
int SimpleBackendImpl::CalculateSizeOfAllEntries( |
const CompletionCallback& callback) { |
- return index_->ExecuteWhenReady(base::Bind( |
- &SimpleBackendImpl::IndexReadyForSizeCalculation, AsWeakPtr(), callback)); |
+ // TODO(msramek): Implement. |
+ return net::ERR_NOT_IMPLEMENTED; |
} |
class SimpleBackendImpl::SimpleIterator final : public Iterator { |
@@ -557,27 +570,6 @@ |
callback.Run(result.net_error); |
} |
-void SimpleBackendImpl::IndexReadyForDoom(Time initial_time, |
- Time end_time, |
- const CompletionCallback& callback, |
- int result) { |
- if (result != net::OK) { |
- callback.Run(result); |
- return; |
- } |
- scoped_ptr<std::vector<uint64>> removed_key_hashes( |
- index_->GetEntriesBetween(initial_time, end_time).release()); |
- DoomEntries(removed_key_hashes.get(), callback); |
-} |
- |
-void SimpleBackendImpl::IndexReadyForSizeCalculation( |
- const CompletionCallback& callback, |
- int result) { |
- if (result == net::OK) |
- result = static_cast<int>(index_->GetCacheSize()); |
- callback.Run(result); |
-} |
- |
SimpleBackendImpl::DiskStatResult SimpleBackendImpl::InitCacheStructureOnDisk( |
const base::FilePath& path, |
uint64 suggested_max_size) { |