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

Unified Diff: sync/internal_api/attachments/attachment_store_frontend.cc

Issue 1002263005: [Sync] Introduce AttachmentStoreForSync class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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: sync/internal_api/attachments/attachment_store_frontend.cc
diff --git a/sync/internal_api/attachments/attachment_store_frontend.cc b/sync/internal_api/attachments/attachment_store_frontend.cc
index 97547de734af6fd0e1d4316cbb2518d3c36e719d..b9d69950700911e85c4933cecd7b947c292bb91f 100644
--- a/sync/internal_api/attachments/attachment_store_frontend.cc
+++ b/sync/internal_api/attachments/attachment_store_frontend.cc
@@ -56,25 +56,33 @@ void AttachmentStoreFrontend::Read(
}
void AttachmentStoreFrontend::Write(
- AttachmentStore::AttachmentReferrer referrer,
+ AttachmentStore::Component component,
const AttachmentList& attachments,
const AttachmentStore::WriteCallback& callback) {
DCHECK(CalledOnValidThread());
backend_task_runner_->PostTask(
FROM_HERE, base::Bind(&AttachmentStoreBackend::Write,
- base::Unretained(backend_.get()), referrer,
+ base::Unretained(backend_.get()), component,
attachments, callback));
}
-void AttachmentStoreFrontend::Drop(
- AttachmentStore::AttachmentReferrer referrer,
+void AttachmentStoreFrontend::SetReference(AttachmentStore::Component component,
+ const AttachmentIdList& ids) {
+ DCHECK(CalledOnValidThread());
+ backend_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&AttachmentStoreBackend::SetReference,
+ base::Unretained(backend_.get()), component, ids));
+}
+
+void AttachmentStoreFrontend::DropReference(
+ AttachmentStore::Component component,
const AttachmentIdList& ids,
const AttachmentStore::DropCallback& callback) {
DCHECK(CalledOnValidThread());
backend_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&AttachmentStoreBackend::Drop,
- base::Unretained(backend_.get()), referrer, ids, callback));
+ base::Bind(&AttachmentStoreBackend::DropReference,
+ base::Unretained(backend_.get()), component, ids, callback));
}
void AttachmentStoreFrontend::ReadMetadata(
@@ -87,13 +95,13 @@ void AttachmentStoreFrontend::ReadMetadata(
}
void AttachmentStoreFrontend::ReadAllMetadata(
- AttachmentStore::AttachmentReferrer referrer,
+ AttachmentStore::Component component,
const AttachmentStore::ReadMetadataCallback& callback) {
DCHECK(CalledOnValidThread());
backend_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentStoreBackend::ReadAllMetadata,
- base::Unretained(backend_.get()), referrer, callback));
+ base::Unretained(backend_.get()), component, callback));
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698