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

Unified Diff: sync/internal_api/public/attachments/attachment_service_impl.h

Issue 996473005: Revert of [Sync] Refactor AttachmentStore classes. Introduce concept of referrer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/internal_api/public/attachments/attachment_service_impl.h
diff --git a/sync/internal_api/public/attachments/attachment_service_impl.h b/sync/internal_api/public/attachments/attachment_service_impl.h
index c3275bffbf905133945b591b4e7cb524d2c56328..e35f5481014bd83e15f685adc36b1782e5e58888 100644
--- a/sync/internal_api/public/attachments/attachment_service_impl.h
+++ b/sync/internal_api/public/attachments/attachment_service_impl.h
@@ -26,9 +26,6 @@
public net::NetworkChangeNotifier::NetworkChangeObserver,
public base::NonThreadSafe {
public:
- // |attachment_store| is required. UploadAttachments reads attachment data
- // from it. Downloaded attachments will be written into it.
- //
// |attachment_uploader| is optional. If null, attachments will never be
// uploaded to the sync server and |delegate|'s OnAttachmentUploaded will
// never be invoked.
@@ -50,7 +47,7 @@
//
// |max_backoff_delay| the maxmium delay between upload attempts when backed
// off.
- AttachmentServiceImpl(scoped_ptr<AttachmentStore> attachment_store,
+ AttachmentServiceImpl(scoped_refptr<AttachmentStore> attachment_store,
scoped_ptr<AttachmentUploader> attachment_uploader,
scoped_ptr<AttachmentDownloader> attachment_downloader,
Delegate* delegate,
@@ -62,6 +59,7 @@
static scoped_ptr<syncer::AttachmentService> CreateForTest();
// AttachmentService implementation.
+ AttachmentStore* GetStore() override;
void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback) override;
void UploadAttachments(const AttachmentIdSet& attachment_ids) override;
@@ -97,7 +95,7 @@
scoped_ptr<AttachmentMap> attachments,
scoped_ptr<AttachmentIdList> unavailable_attachment_ids);
- scoped_ptr<AttachmentStore> attachment_store_;
+ scoped_refptr<AttachmentStore> attachment_store_;
// May be null.
const scoped_ptr<AttachmentUploader> attachment_uploader_;

Powered by Google App Engine
This is Rietveld 408576698