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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 113930: Disk cache: Reset mask_ when the disk cache is being restarted.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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/data/cache_tests/bad_rankings2/index ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
===================================================================
--- net/disk_cache/backend_impl.cc (revision 17031)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -788,6 +788,10 @@
LogStats();
ReportError(error);
+ // Reset the mask_ if it was not given by the user.
+ if (mask_ == data_->header.table_len - 1)
+ mask_ = 0;
+
// Setting the index table length to an invalid value will force re-creation
// of the cache files.
data_->header.table_len = 1;
@@ -983,6 +987,10 @@
}
void BackendImpl::PrepareForRestart() {
+ // Reset the mask_ if it was not given by the user.
+ if (mask_ == data_->header.table_len - 1)
+ mask_ = 0;
+
data_->header.crash = 0;
index_ = NULL;
data_ = NULL;
« no previous file with comments | « net/data/cache_tests/bad_rankings2/index ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698