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

Unified Diff: components/safe_browsing_db/v4_get_hash_protocol_manager.cc

Issue 2915443002: Deprecate NonThreadSafe in components/safe_browsing_db in favor of SequenceChecker. (Closed)
Patch Set: Created 3 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
Index: components/safe_browsing_db/v4_get_hash_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
index 77488c2c42253a883d29520c62c258156c609f1b..9cfd8ffa13ee7512ad46b9a9146af5a776cecf57 100644
--- a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
@@ -255,10 +255,12 @@ V4GetHashProtocolManager::V4GetHashProtocolManager(
threat_types_.assign(threat_types.begin(), threat_types.end());
}
-V4GetHashProtocolManager::~V4GetHashProtocolManager() {}
+V4GetHashProtocolManager::~V4GetHashProtocolManager() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+}
void V4GetHashProtocolManager::ClearCache() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
full_hash_cache_.clear();
}
@@ -267,7 +269,7 @@ void V4GetHashProtocolManager::GetFullHashes(
full_hash_to_store_and_hash_prefixes,
FullHashCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!full_hash_to_store_and_hash_prefixes.empty());
std::vector<HashPrefix> prefixes_to_request;
@@ -506,7 +508,7 @@ void V4GetHashProtocolManager::GetHashUrlAndHeaders(
}
void V4GetHashProtocolManager::HandleGetHashError(const Time& now) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
TimeDelta next = V4ProtocolManagerUtil::GetNextBackOffInterval(
&gethash_error_count_, &gethash_back_off_mult_);
next_gethash_time_ = now + next;
@@ -738,7 +740,7 @@ void V4GetHashProtocolManager::MergeResults(
// SafeBrowsing request responses are handled here.
void V4GetHashProtocolManager::OnURLFetchComplete(
const net::URLFetcher* source) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK_CURRENTLY_ON(BrowserThread::IO);
PendingHashRequests::iterator it = pending_hash_requests_.find(source);
« no previous file with comments | « components/safe_browsing_db/v4_get_hash_protocol_manager.h ('k') | components/safe_browsing_db/v4_update_protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698