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

Unified Diff: components/sync/engine/attachments/attachment_store_frontend.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/attachments/attachment_store_frontend.cc
diff --git a/components/sync/engine/attachments/attachment_store_frontend.cc b/components/sync/engine/attachments/attachment_store_frontend.cc
index ffc50eb8efc3a9e1aa36d5527133472feab1d054..d67c2c14ed32f3b493b4d057a1aa6fbf1fd3ef45 100644
--- a/components/sync/engine/attachments/attachment_store_frontend.cc
+++ b/components/sync/engine/attachments/attachment_store_frontend.cc
@@ -31,6 +31,7 @@ AttachmentStoreFrontend::AttachmentStoreFrontend(
}
AttachmentStoreFrontend::~AttachmentStoreFrontend() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(backend_);
// To delete backend post task that doesn't do anything, but binds backend
// through base::Passed. This way backend will be deleted regardless whether
@@ -41,7 +42,7 @@ AttachmentStoreFrontend::~AttachmentStoreFrontend() {
void AttachmentStoreFrontend::Init(
const AttachmentStore::InitCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE, base::Bind(&AttachmentStoreBackend::Init,
base::Unretained(backend_.get()), callback));
@@ -51,7 +52,7 @@ void AttachmentStoreFrontend::Read(
AttachmentStore::Component component,
const AttachmentIdList& ids,
const AttachmentStore::ReadCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentStoreBackend::Read,
@@ -62,7 +63,7 @@ void AttachmentStoreFrontend::Write(
AttachmentStore::Component component,
const AttachmentList& attachments,
const AttachmentStore::WriteCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE, base::Bind(&AttachmentStoreBackend::Write,
base::Unretained(backend_.get()), component,
@@ -71,7 +72,7 @@ void AttachmentStoreFrontend::Write(
void AttachmentStoreFrontend::SetReference(AttachmentStore::Component component,
const AttachmentIdList& ids) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE, base::Bind(&AttachmentStoreBackend::SetReference,
base::Unretained(backend_.get()), component, ids));
@@ -81,7 +82,7 @@ void AttachmentStoreFrontend::DropReference(
AttachmentStore::Component component,
const AttachmentIdList& ids,
const AttachmentStore::DropCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentStoreBackend::DropReference,
@@ -92,7 +93,7 @@ void AttachmentStoreFrontend::ReadMetadataById(
AttachmentStore::Component component,
const AttachmentIdList& ids,
const AttachmentStore::ReadMetadataCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentStoreBackend::ReadMetadataById,
@@ -102,7 +103,7 @@ void AttachmentStoreFrontend::ReadMetadataById(
void AttachmentStoreFrontend::ReadMetadata(
AttachmentStore::Component component,
const AttachmentStore::ReadMetadataCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
backend_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentStoreBackend::ReadMetadata,

Powered by Google App Engine
This is Rietveld 408576698