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

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

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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
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 9b4c57e183d4762f010c6c6cd3e15620e58f3743..e7176552732d0cf2d1dd9d6a60c36715307fbc2c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -287,7 +287,7 @@ void SafeBrowsingDatabaseNew::Init(const FilePath& filename_base) {
// until it returns, there are no pointers to this class on other
// threads. Then again, that means there is no possibility of
// contention on the lock...
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
DCHECK(browse_filename_.empty()); // Ensure we haven't been run before.
DCHECK(download_filename_.empty()); // Ensure we haven't been run before.
@@ -324,7 +324,7 @@ bool SafeBrowsingDatabaseNew::ResetDatabase() {
// Reset objects in memory.
{
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
full_browse_hashes_.clear();
pending_browse_hashes_.clear();
prefix_miss_cache_.clear();
@@ -355,7 +355,7 @@ bool SafeBrowsingDatabaseNew::ContainsBrowseUrl(
// This function is called on the I/O thread, prevent changes to
// bloom filter and caches.
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
if (!browse_bloom_filter_.get())
return false;
@@ -607,7 +607,7 @@ void SafeBrowsingDatabaseNew::CacheHashResults(
const std::vector<SBPrefix>& prefixes,
const std::vector<SBFullHashResult>& full_hits) {
// This is called on the I/O thread, lock against updates.
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
if (full_hits.empty()) {
prefix_miss_cache_.insert(prefixes.begin(), prefixes.end());
@@ -729,7 +729,7 @@ void SafeBrowsingDatabaseNew::UpdateBrowseStore() {
// case |ContainsBrowseURL()| is called before the new filter is complete.
std::vector<SBAddFullHash> pending_add_hashes;
{
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
pending_add_hashes.insert(pending_add_hashes.end(),
pending_browse_hashes_.begin(),
pending_browse_hashes_.end());
@@ -778,7 +778,7 @@ void SafeBrowsingDatabaseNew::UpdateBrowseStore() {
// Swap in the newly built filter and cache.
{
- AutoLock locked(lookup_lock_);
+ base::AutoLock locked(lookup_lock_);
full_browse_hashes_.swap(add_full_hashes);
// TODO(shess): If |CacheHashResults()| is posted between the
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698