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

Unified Diff: components/sync/engine_impl/attachments/attachment_downloader_impl.cc

Issue 2915453002: Deprecate NonThreadSafe in components/sync in favor of SequenceChecker. (Closed)
Patch Set: fix comment 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/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();

Powered by Google App Engine
This is Rietveld 408576698