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

Unified Diff: sync/api/attachments/attachment_service_proxy.h

Issue 213003004: Replace calls to 3-arg SyncData::CreateLocalData with 5-arg version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Forgot a class keyword. Created 6 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/api/attachments/attachment_service_proxy.h
diff --git a/sync/api/attachments/attachment_service_proxy.h b/sync/api/attachments/attachment_service_proxy.h
index 5bec1b3206ab8007e3937d5df00c364a6473b83b..cebc4daaaf30444c0272fe584e0c99fa9e5926ee 100644
--- a/sync/api/attachments/attachment_service_proxy.h
+++ b/sync/api/attachments/attachment_service_proxy.h
@@ -33,7 +33,9 @@ class SyncData;
// correct thread (wrapped_task_runner).
//
// This class is thread-safe.
-class SYNC_EXPORT AttachmentServiceProxy : public AttachmentService {
+class SYNC_EXPORT AttachmentServiceProxy
+ : public AttachmentService,
+ public base::RefCountedThreadSafe<AttachmentServiceProxy> {
public:
// Default copy and assignment are welcome.
@@ -46,8 +48,6 @@ class SYNC_EXPORT AttachmentServiceProxy : public AttachmentService {
const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
base::WeakPtr<syncer::AttachmentService> wrapped);
- virtual ~AttachmentServiceProxy();
-
// AttachmentService implementation.
virtual void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback)
@@ -59,7 +59,12 @@ class SYNC_EXPORT AttachmentServiceProxy : public AttachmentService {
virtual void OnSyncDataUpdate(const AttachmentIdList& old_attachment_ids,
const SyncData& updated_sync_data) OVERRIDE;
+ protected:
+ virtual ~AttachmentServiceProxy();
+
private:
+ friend class base::RefCountedThreadSafe<AttachmentServiceProxy>;
+
scoped_refptr<base::SequencedTaskRunner> wrapped_task_runner_;
// wrapped_ must only be dereferenced on the wrapped_task_runner_ thread.
base::WeakPtr<AttachmentService> wrapped_;

Powered by Google App Engine
This is Rietveld 408576698