| 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();
|
|
|
|
|