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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 7650022: Skip updating rank in OnExternalCacheHit if cache is uninitialized or disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only check disabled Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index deacdd3c7eb4e23857e947ee845ccc3452458ec3..520be91ca2814f789bca3a9e4cc93b9ae782d44c 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -683,6 +683,9 @@ void BackendImpl::SyncEndEnumeration(void* iter) {
}
void BackendImpl::SyncOnExternalCacheHit(const std::string& key) {
+ if (disabled_)
+ return;
+
uint32 hash = Hash(key);
bool error;
EntryImpl* cache_entry = MatchEntry(key, hash, false, Addr(), &error);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698