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

Unified Diff: sync/api/attachments/attachment_service_proxy.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
Index: sync/api/attachments/attachment_service_proxy.cc
diff --git a/sync/api/attachments/attachment_service_proxy.cc b/sync/api/attachments/attachment_service_proxy.cc
index 6590033df531b2855ccdd0b85d6ac74b38122519..9bc40e5530ca745a403c7e71e0a3032e9792215d 100644
--- a/sync/api/attachments/attachment_service_proxy.cc
+++ b/sync/api/attachments/attachment_service_proxy.cc
@@ -32,15 +32,6 @@
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
const AttachmentService::DropCallback& callback,
const AttachmentService::DropResult& result) {
- task_runner->PostTask(FROM_HERE, base::Bind(callback, result));
-}
-
-// Invokes |callback| with |result| and |attachments| in the |task_runner|
-// thread.
-void ProxyStoreCallback(
- const scoped_refptr<base::SequencedTaskRunner>& task_runner,
- const AttachmentService::StoreCallback& callback,
- const AttachmentService::StoreResult& result) {
task_runner->PostTask(FROM_HERE, base::Bind(callback, result));
}
@@ -94,17 +85,11 @@
proxy_callback));
}
-void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments,
- const StoreCallback& callback) {
+void AttachmentServiceProxy::OnSyncDataAdd(const SyncData& sync_data) {
DCHECK(wrapped_task_runner_);
- StoreCallback proxy_callback = base::Bind(
- &ProxyStoreCallback, base::MessageLoopProxy::current(), callback);
wrapped_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&AttachmentService::StoreAttachments,
- core_,
- attachments,
- proxy_callback));
+ base::Bind(&AttachmentService::OnSyncDataAdd, core_, sync_data));
}
void AttachmentServiceProxy::OnSyncDataDelete(const SyncData& sync_data) {
@@ -152,13 +137,11 @@
wrapped_->DropAttachments(attachment_ids, callback);
}
-void AttachmentServiceProxy::Core::StoreAttachments(
- const AttachmentList& attachments,
- const StoreCallback& callback) {
+void AttachmentServiceProxy::Core::OnSyncDataAdd(const SyncData& sync_data) {
if (!wrapped_) {
return;
}
- wrapped_->StoreAttachments(attachments, callback);
+ wrapped_->OnSyncDataAdd(sync_data);
}
void AttachmentServiceProxy::Core::OnSyncDataDelete(const SyncData& sync_data) {
« no previous file with comments | « sync/api/attachments/attachment_service_proxy.h ('k') | sync/api/attachments/attachment_service_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698