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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_database.cc

Issue 793663003: Fix a race condition in SafeBrowsingDatabaseNew::IsCsdWhitelistKillSwitchOn() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_threadchecks_rebased
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/safe_browsing_database.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 } 1689 }
1690 1690
1691 bool SafeBrowsingDatabaseNew::IsMalwareIPMatchKillSwitchOn() { 1691 bool SafeBrowsingDatabaseNew::IsMalwareIPMatchKillSwitchOn() {
1692 SBFullHash malware_kill_switch = SBFullHashForString(kMalwareIPKillSwitchUrl); 1692 SBFullHash malware_kill_switch = SBFullHashForString(kMalwareIPKillSwitchUrl);
1693 std::vector<SBFullHash> full_hashes; 1693 std::vector<SBFullHash> full_hashes;
1694 full_hashes.push_back(malware_kill_switch); 1694 full_hashes.push_back(malware_kill_switch);
1695 return ContainsWhitelistedHashes(csd_whitelist_, full_hashes); 1695 return ContainsWhitelistedHashes(csd_whitelist_, full_hashes);
1696 } 1696 }
1697 1697
1698 bool SafeBrowsingDatabaseNew::IsCsdWhitelistKillSwitchOn() { 1698 bool SafeBrowsingDatabaseNew::IsCsdWhitelistKillSwitchOn() {
1699 base::AutoLock locked(lookup_lock_);
1699 return csd_whitelist_.second; 1700 return csd_whitelist_.second;
1700 } 1701 }
OLDNEW
« 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