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 88d2741e9797f8452efeea09fa1bbd376ed9354b..f9e5ffbd4bfbd9272c1550015011315808de1e3e 100644 |
--- a/net/disk_cache/simple/simple_backend_impl.cc |
+++ b/net/disk_cache/simple/simple_backend_impl.cc |
@@ -384,6 +384,14 @@ int32_t SimpleBackendImpl::GetEntryCount() const { |
int SimpleBackendImpl::OpenEntry(const std::string& key, |
Entry** entry, |
const CompletionCallback& callback) { |
+ return OpenEntryWithOracleByte(key, entry, OracleCallback(), callback); |
+} |
+ |
+int SimpleBackendImpl::OpenEntryWithOracleByte( |
+ const std::string& key, |
+ Entry** entry, |
+ const OracleCallback& oracle, |
+ const CompletionCallback& callback) { |
const uint64_t entry_hash = simple_util::GetEntryHashKey(key); |
// TODO(gavinp): Factor out this (not quite completely) repetitive code |
@@ -400,7 +408,7 @@ int SimpleBackendImpl::OpenEntry(const std::string& key, |
} |
scoped_refptr<SimpleEntryImpl> simple_entry = |
CreateOrFindActiveEntry(entry_hash, key); |
- return simple_entry->OpenEntry(entry, callback); |
+ return simple_entry->OpenEntry(entry, oracle, callback); |
} |
int SimpleBackendImpl::CreateEntry(const std::string& key, |
@@ -700,7 +708,7 @@ int SimpleBackendImpl::OpenEntryFromHash(uint64_t entry_hash, |
CompletionCallback backend_callback = |
base::Bind(&SimpleBackendImpl::OnEntryOpenedFromHash, |
AsWeakPtr(), entry_hash, entry, simple_entry, callback); |
- return simple_entry->OpenEntry(entry, backend_callback); |
+ return simple_entry->OpenEntry(entry, OracleCallback(), backend_callback); |
} |
int SimpleBackendImpl::DoomEntryFromHash(uint64_t entry_hash, |
@@ -757,7 +765,7 @@ void SimpleBackendImpl::OnEntryOpenedFromHash( |
// finish. The entry created from hash needs to be closed, and the one |
// in |active_entries_| can be returned to the caller. |
simple_entry->Close(); |
- it->second->OpenEntry(entry, callback); |
+ it->second->OpenEntry(entry, OracleCallback(), callback); |
} |
} |