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

Unified Diff: components/safe_browsing_db/v4_update_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
« no previous file with comments | « components/safe_browsing_db/v4_update_protocol_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_update_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_update_protocol_manager.cc b/components/safe_browsing_db/v4_update_protocol_manager.cc
index 3d485bdd6bfee824f272905ef7bab3a649dfa61b..ddd08f588b6c84e31445c5cfaf4e8d6664086abe 100644
--- a/components/safe_browsing_db/v4_update_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_update_protocol_manager.cc
@@ -153,7 +153,9 @@ V4UpdateProtocolManager::V4UpdateProtocolManager(
// when it is ready to process updates.
}
-V4UpdateProtocolManager::~V4UpdateProtocolManager() {}
+V4UpdateProtocolManager::~V4UpdateProtocolManager() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+}
bool V4UpdateProtocolManager::IsUpdateScheduled() const {
return update_timer_.IsRunning();
@@ -166,7 +168,7 @@ void V4UpdateProtocolManager::ScheduleNextUpdate(
}
void V4UpdateProtocolManager::ScheduleNextUpdateWithBackoff(bool back_off) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (config_.disable_auto_update) {
DCHECK(!IsUpdateScheduled());
@@ -181,7 +183,7 @@ void V4UpdateProtocolManager::ScheduleNextUpdateWithBackoff(bool back_off) {
// According to section 5 of the SafeBrowsing protocol specification, we must
// back off after a certain number of errors.
base::TimeDelta V4UpdateProtocolManager::GetNextUpdateInterval(bool back_off) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(next_update_interval_ > base::TimeDelta());
base::TimeDelta next = next_update_interval_;
@@ -208,7 +210,7 @@ base::TimeDelta V4UpdateProtocolManager::GetNextUpdateInterval(bool back_off) {
void V4UpdateProtocolManager::ScheduleNextUpdateAfterInterval(
base::TimeDelta interval) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(interval >= base::TimeDelta());
// Unschedule any current timer.
@@ -299,7 +301,7 @@ bool V4UpdateProtocolManager::ParseUpdateResponse(
}
void V4UpdateProtocolManager::IssueUpdateRequest() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// If an update request is already pending, record and return silently.
if (request_.get()) {
@@ -370,7 +372,7 @@ void V4UpdateProtocolManager::HandleTimeout() {
// SafeBrowsing request responses are handled here.
void V4UpdateProtocolManager::OnURLFetchComplete(
const net::URLFetcher* source) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
timeout_timer_.Stop();
« no previous file with comments | « components/safe_browsing_db/v4_update_protocol_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698