summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/mem_backend_impl.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-14 01:30:53 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-14 01:30:53 +0000
commit7d7ad6e4439730c800ed8de654378683f587ee3a (patch)
tree8912f0d50a86565e62623c1a806c3869f90be90a /net/disk_cache/mem_backend_impl.cc
parent56ee3109efdf0eae868fc75fc52c64a226d40579 (diff)
downloadchromium_src-7d7ad6e4439730c800ed8de654378683f587ee3a.zip
chromium_src-7d7ad6e4439730c800ed8de654378683f587ee3a.tar.gz
chromium_src-7d7ad6e4439730c800ed8de654378683f587ee3a.tar.bz2
Http Cache: Use asynchronous Open/Create/Doom entry calls.
More changes to the state machine: now we really issue asynchronous calls when getting new cache entries. We have to add a new serialization mechanism to the http cache in order to handle races among multiple requests creating and opening the same entry. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/523019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/mem_backend_impl.cc')
-rw-r--r--net/disk_cache/mem_backend_impl.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/disk_cache/mem_backend_impl.cc b/net/disk_cache/mem_backend_impl.cc
index 0b0d7bd..875efdc 100644
--- a/net/disk_cache/mem_backend_impl.cc
+++ b/net/disk_cache/mem_backend_impl.cc
@@ -144,6 +144,14 @@ bool MemBackendImpl::DoomEntry(const std::string& key) {
return true;
}
+int MemBackendImpl::DoomEntry(const std::string& key,
+ CompletionCallback* callback) {
+ if (DoomEntry(key))
+ return net::OK;
+
+ return net::ERR_FAILED;
+}
+
void MemBackendImpl::InternalDoomEntry(MemEntryImpl* entry) {
// Only parent entries can be passed into this method.
DCHECK(entry->type() == MemEntryImpl::kParentEntry);