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

Unified Diff: sync/api/attachments/fake_attachment_service.cc

Issue 265853004: Revert of Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « sync/api/attachments/fake_attachment_service.h ('k') | sync/api/sync_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/attachments/fake_attachment_service.cc
diff --git a/sync/api/attachments/fake_attachment_service.cc b/sync/api/attachments/fake_attachment_service.cc
index 609c046a39598a91d00a497b73317933fe11b9e5..8e9e867f9ada7acde10079892cfde7cf2ff3a298 100644
--- a/sync/api/attachments/fake_attachment_service.cc
+++ b/sync/api/attachments/fake_attachment_service.cc
@@ -53,15 +53,10 @@
callback));
}
-void FakeAttachmentService::StoreAttachments(const AttachmentList& attachments,
- const StoreCallback& callback) {
+void FakeAttachmentService::OnSyncDataAdd(const SyncData& sync_data) {
DCHECK(CalledOnValidThread());
- attachment_store_->Write(attachments,
- base::Bind(&FakeAttachmentService::WriteDone,
- weak_ptr_factory_.GetWeakPtr(),
- callback));
- // TODO(maniscalco): Ensure the linked attachments are schedule for upload to
- // the server (bug 356351).
+ // TODO(maniscalco): Ensure the linked attachments get persisted in local
+ // storage and schedule them for upload to the server (bug 356351).
}
void FakeAttachmentService::OnSyncDataDelete(const SyncData& sync_data) {
@@ -106,16 +101,4 @@
base::Bind(callback, drop_result));
}
-void FakeAttachmentService::WriteDone(const StoreCallback& callback,
- const AttachmentStore::Result& result) {
- AttachmentService::StoreResult store_result =
- AttachmentService::STORE_UNSPECIFIED_ERROR;
- if (result == AttachmentStore::SUCCESS) {
- store_result = AttachmentService::STORE_SUCCESS;
- }
- // TODO(maniscalco): Deal with case where an error occurred (bug 361251).
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, store_result));
-}
-
} // namespace syncer
« no previous file with comments | « sync/api/attachments/fake_attachment_service.h ('k') | sync/api/sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698