1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/attachments/attachment_downloader_impl.h"
8 #include "base/message_loop/message_loop.h"
12 AttachmentDownloaderImpl::AttachmentDownloaderImpl() {
15 AttachmentDownloaderImpl::~AttachmentDownloaderImpl() {
16 DCHECK(CalledOnValidThread());
19 void AttachmentDownloaderImpl::DownloadAttachment(
20 const AttachmentId& attachment_id,
21 const DownloadCallback& callback) {
22 DCHECK(CalledOnValidThread());
23 // No real implementation yet. Fail every request with
24 // DOWNLOAD_UNSPECIFIED_ERROR.
25 scoped_ptr<Attachment> attachment;
26 base::MessageLoop::current()->PostTask(
29 callback, DOWNLOAD_UNSPECIFIED_ERROR, base::Passed(&attachment)));