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_; |