diff options
Diffstat (limited to 'sync/internal_api/attachments/attachment_service_proxy.cc')
-rw-r--r-- | sync/internal_api/attachments/attachment_service_proxy.cc | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/sync/internal_api/attachments/attachment_service_proxy.cc b/sync/internal_api/attachments/attachment_service_proxy.cc index 1d41878..ef858dd 100644 --- a/sync/internal_api/attachments/attachment_service_proxy.cc +++ b/sync/internal_api/attachments/attachment_service_proxy.cc @@ -35,15 +35,6 @@ void ProxyDropCallback( 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)); -} - } // namespace AttachmentServiceProxy::AttachmentServiceProxy() { @@ -67,6 +58,10 @@ AttachmentServiceProxy::AttachmentServiceProxy( AttachmentServiceProxy::~AttachmentServiceProxy() { } +AttachmentStore* AttachmentServiceProxy::GetStore() { + return NULL; +} + void AttachmentServiceProxy::GetOrDownloadAttachments( const AttachmentIdList& attachment_ids, const GetOrDownloadCallback& callback) { @@ -96,17 +91,12 @@ void AttachmentServiceProxy::DropAttachments( proxy_callback)); } -void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments, - const StoreCallback& callback) { - DCHECK(wrapped_task_runner_.get()); - StoreCallback proxy_callback = base::Bind( - &ProxyStoreCallback, base::ThreadTaskRunnerHandle::Get(), callback); +void AttachmentServiceProxy::UploadAttachments( + const AttachmentIdSet& attachment_ids) { + DCHECK(wrapped_task_runner_); wrapped_task_runner_->PostTask( FROM_HERE, - base::Bind(&AttachmentService::StoreAttachments, - core_, - attachments, - proxy_callback)); + base::Bind(&AttachmentService::UploadAttachments, core_, attachment_ids)); } AttachmentServiceProxy::Core::Core( @@ -117,6 +107,10 @@ AttachmentServiceProxy::Core::Core( AttachmentServiceProxy::Core::~Core() { } +AttachmentStore* AttachmentServiceProxy::Core::GetStore() { + return NULL; +} + void AttachmentServiceProxy::Core::GetOrDownloadAttachments( const AttachmentIdList& attachment_ids, const GetOrDownloadCallback& callback) { @@ -135,13 +129,12 @@ void AttachmentServiceProxy::Core::DropAttachments( wrapped_->DropAttachments(attachment_ids, callback); } -void AttachmentServiceProxy::Core::StoreAttachments( - const AttachmentList& attachments, - const StoreCallback& callback) { +void AttachmentServiceProxy::Core::UploadAttachments( + const AttachmentIdSet& attachment_ids) { if (!wrapped_) { return; } - wrapped_->StoreAttachments(attachments, callback); + wrapped_->UploadAttachments(attachment_ids); } } // namespace syncer |