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

Side by Side Diff: sync/api/attachments/attachment_service_base.h

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Add AttachmentServiceBase allowing us to drop AsWeakPtr and RefCountedThreadSafe from AttachmentServiceProxy. 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_BASE_H_
6 #define SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_BASE_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "sync/api/attachments/attachment_service.h"
10 #include "sync/base/sync_export.h"
11
12 namespace syncer {
13
14 // AttachmentServiceBase is an AttachmentService that provides WeakPtrs. It is
15 // designed to be used in conjunction with AttachmentServiceProxy.
16 class SYNC_EXPORT AttachmentServiceBase : public AttachmentService {
17 public:
18 AttachmentServiceBase();
19 virtual ~AttachmentServiceBase();
20
21 // Implementation is intentionally omitted. A derived class should provide
22 // its own implementation and ensure that its WeakPtrFactory is destroyed
23 // immediately after the derived class's destructor is invoked. See
24 // SupportsWeakPtr class comment for rationale.
25 virtual base::WeakPtr<AttachmentServiceBase> AsWeakPtr() = 0;
tim (not reviewing) 2014/03/27 17:01:44 The more I look at it, the less I think of this as
maniscalco 2014/03/27 17:36:24 I like this approach. It's nice to eliminate Atta
26 };
27
28 } // namespace syncer
29
30 #endif // SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_BASE_H_
OLDNEW
« no previous file with comments | « sync/api/attachments/attachment_service.cc ('k') | sync/api/attachments/attachment_service_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698