| Index: components/sync/engine_impl/attachments/attachment_downloader_impl.cc
|
| diff --git a/components/sync/engine_impl/attachments/attachment_downloader_impl.cc b/components/sync/engine_impl/attachments/attachment_downloader_impl.cc
|
| index 2651c581ae4deb86006cf7fd5763c29193898956..8f980199f55a8478e31e67312d2ff603f1bd4445 100644
|
| --- a/components/sync/engine_impl/attachments/attachment_downloader_impl.cc
|
| +++ b/components/sync/engine_impl/attachments/attachment_downloader_impl.cc
|
| @@ -76,12 +76,14 @@ AttachmentDownloaderImpl::AttachmentDownloaderImpl(
|
| DCHECK(!raw_store_birthday_.empty());
|
| }
|
|
|
| -AttachmentDownloaderImpl::~AttachmentDownloaderImpl() {}
|
| +AttachmentDownloaderImpl::~AttachmentDownloaderImpl() {
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| +}
|
|
|
| void AttachmentDownloaderImpl::DownloadAttachment(
|
| const AttachmentId& attachment_id,
|
| const DownloadCallback& callback) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
|
| AttachmentUrl url = AttachmentUploaderImpl::GetURLForAttachmentId(
|
| sync_service_url_, attachment_id)
|
| @@ -107,7 +109,7 @@ void AttachmentDownloaderImpl::OnGetTokenSuccess(
|
| const OAuth2TokenService::Request* request,
|
| const std::string& access_token,
|
| const base::Time& expiration_time) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| DCHECK(request == access_token_request_.get());
|
| access_token_request_.reset();
|
| StateList::const_iterator iter;
|
| @@ -127,7 +129,7 @@ void AttachmentDownloaderImpl::OnGetTokenSuccess(
|
| void AttachmentDownloaderImpl::OnGetTokenFailure(
|
| const OAuth2TokenService::Request* request,
|
| const GoogleServiceAuthError& error) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| DCHECK(request == access_token_request_.get());
|
| access_token_request_.reset();
|
| StateList::const_iterator iter;
|
| @@ -149,7 +151,7 @@ void AttachmentDownloaderImpl::OnGetTokenFailure(
|
|
|
| void AttachmentDownloaderImpl::OnURLFetchComplete(
|
| const net::URLFetcher* source) {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
|
| // Find DownloadState by url.
|
| AttachmentUrl url = source->GetOriginalURL().spec();
|
|
|