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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database.cc

Issue 449283002: Safebrowsing: grab lookup_lock_ when clearing browse_gethash_cache_ during update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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: chrome/browser/safe_browsing/safe_browsing_database.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index 07f674c9e2289593260ebd4b7312857ece1323de..9e0090e6fb8f568e0705b8d53a3241dd3a097e1f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -1013,9 +1013,12 @@ bool SafeBrowsingDatabaseNew::UpdateStarted(
return false;
}
- // Cached fullhash results must be cleared on every database update (whether
- // successful or not.)
- browse_gethash_cache_.clear();
+ {
+ base::AutoLock locked(lookup_lock_);
+ // Cached fullhash results must be cleared on every database update (whether
+ // successful or not.)
+ browse_gethash_cache_.clear();
+ }
UpdateChunkRangesForLists(browse_store_.get(),
safe_browsing_util::kMalwareList,
« 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