Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 1401053004: Revert of Implement cache counting for the simple and memory backends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/disk_cache/simple/simple_index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/disk_cache/simple/simple_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698