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 3c14d3fbf88faec4bcbbad7c80e55cd7e58e0779..4587bf9a3f886e886acf057941bfcda4ea0dcc8e 100644 |
--- a/net/disk_cache/simple/simple_backend_impl.cc |
+++ b/net/disk_cache/simple/simple_backend_impl.cc |
@@ -390,14 +390,7 @@ int SimpleBackendImpl::OpenEntry(const std::string& key, |
} |
scoped_refptr<SimpleEntryImpl> simple_entry = |
CreateOrFindActiveEntry(entry_hash, key); |
- CompletionCallback backend_callback = |
- base::Bind(&SimpleBackendImpl::OnEntryOpenedFromKey, |
- AsWeakPtr(), |
- key, |
- entry, |
- simple_entry, |
- callback); |
- return simple_entry->OpenEntry(entry, backend_callback); |
+ return simple_entry->OpenEntry(entry, callback); |
} |
int SimpleBackendImpl::CreateEntry(const std::string& key, |
@@ -713,29 +706,6 @@ void SimpleBackendImpl::OnEntryOpenedFromHash( |
} |
} |
-void SimpleBackendImpl::OnEntryOpenedFromKey( |
- const std::string key, |
- Entry** entry, |
- const scoped_refptr<SimpleEntryImpl>& simple_entry, |
- const CompletionCallback& callback, |
- int error_code) { |
- int final_code = error_code; |
- if (final_code == net::OK) { |
- bool key_matches = key.compare(simple_entry->key()) == 0; |
- if (!key_matches) { |
- // TODO(clamy): Add a unit test to check this code path. |
- DLOG(WARNING) << "Key mismatch on open."; |
- simple_entry->Doom(); |
- simple_entry->Close(); |
- final_code = net::ERR_FAILED; |
- } else { |
- DCHECK_EQ(simple_entry->entry_hash(), simple_util::GetEntryHashKey(key)); |
- } |
- SIMPLE_CACHE_UMA(BOOLEAN, "KeyMatchedOnOpen", cache_type_, key_matches); |
- } |
- callback.Run(final_code); |
-} |
- |
void SimpleBackendImpl::DoomEntriesComplete( |
std::unique_ptr<std::vector<uint64_t>> entry_hashes, |
const net::CompletionCallback& callback, |