| Index: sync/internal_api/attachments/attachment_service_impl.cc
|
| diff --git a/sync/internal_api/attachments/attachment_service_impl.cc b/sync/internal_api/attachments/attachment_service_impl.cc
|
| index e76151507fa8f99543951c3f79b9354669e34d32..cc04408ef332c76f8afcb8b3e9ec11a8e7711ba9 100644
|
| --- a/sync/internal_api/attachments/attachment_service_impl.cc
|
| +++ b/sync/internal_api/attachments/attachment_service_impl.cc
|
| @@ -110,13 +110,13 @@
|
| }
|
|
|
| AttachmentServiceImpl::AttachmentServiceImpl(
|
| - scoped_ptr<AttachmentStore> attachment_store,
|
| + scoped_refptr<AttachmentStore> attachment_store,
|
| scoped_ptr<AttachmentUploader> attachment_uploader,
|
| scoped_ptr<AttachmentDownloader> attachment_downloader,
|
| Delegate* delegate,
|
| const base::TimeDelta& initial_backoff_delay,
|
| const base::TimeDelta& max_backoff_delay)
|
| - : attachment_store_(attachment_store.Pass()),
|
| + : attachment_store_(attachment_store),
|
| attachment_uploader_(attachment_uploader.Pass()),
|
| attachment_downloader_(attachment_downloader.Pass()),
|
| delegate_(delegate),
|
| @@ -144,14 +144,14 @@
|
|
|
| // Static.
|
| scoped_ptr<syncer::AttachmentService> AttachmentServiceImpl::CreateForTest() {
|
| - scoped_ptr<syncer::AttachmentStore> attachment_store =
|
| + scoped_refptr<syncer::AttachmentStore> attachment_store =
|
| AttachmentStore::CreateInMemoryStore();
|
| scoped_ptr<AttachmentUploader> attachment_uploader(
|
| new FakeAttachmentUploader);
|
| scoped_ptr<AttachmentDownloader> attachment_downloader(
|
| new FakeAttachmentDownloader());
|
| scoped_ptr<syncer::AttachmentService> attachment_service(
|
| - new syncer::AttachmentServiceImpl(attachment_store.Pass(),
|
| + new syncer::AttachmentServiceImpl(attachment_store,
|
| attachment_uploader.Pass(),
|
| attachment_downloader.Pass(),
|
| NULL,
|
| @@ -160,6 +160,10 @@
|
| return attachment_service.Pass();
|
| }
|
|
|
| +AttachmentStore* AttachmentServiceImpl::GetStore() {
|
| + return attachment_store_.get();
|
| +}
|
| +
|
| void AttachmentServiceImpl::GetOrDownloadAttachments(
|
| const AttachmentIdList& attachment_ids,
|
| const GetOrDownloadCallback& callback) {
|
| @@ -168,7 +172,8 @@
|
| new GetOrDownloadState(attachment_ids, callback));
|
| attachment_store_->Read(attachment_ids,
|
| base::Bind(&AttachmentServiceImpl::ReadDone,
|
| - weak_ptr_factory_.GetWeakPtr(), state));
|
| + weak_ptr_factory_.GetWeakPtr(),
|
| + state));
|
| }
|
|
|
| void AttachmentServiceImpl::ReadDone(
|
|
|