OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 AttachmentStoreFrontend( | 34 AttachmentStoreFrontend( |
35 scoped_ptr<AttachmentStoreBackend> backend, | 35 scoped_ptr<AttachmentStoreBackend> backend, |
36 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner); | 36 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner); |
37 | 37 |
38 void Init(const AttachmentStore::InitCallback& callback); | 38 void Init(const AttachmentStore::InitCallback& callback); |
39 | 39 |
40 void Read(const AttachmentIdList& ids, | 40 void Read(const AttachmentIdList& ids, |
41 const AttachmentStore::ReadCallback& callback); | 41 const AttachmentStore::ReadCallback& callback); |
42 | 42 |
43 void Write(AttachmentStore::AttachmentReferrer referrer, | 43 void Write(AttachmentStore::Component component, |
44 const AttachmentList& attachments, | 44 const AttachmentList& attachments, |
45 const AttachmentStore::WriteCallback& callback); | 45 const AttachmentStore::WriteCallback& callback); |
46 | 46 void SetReference(AttachmentStore::Component component, |
47 void Drop(AttachmentStore::AttachmentReferrer referrer, | 47 const AttachmentIdList& ids); |
48 const AttachmentIdList& ids, | 48 void DropReference(AttachmentStore::Component component, |
49 const AttachmentStore::DropCallback& callback); | 49 const AttachmentIdList& ids, |
| 50 const AttachmentStore::DropCallback& callback); |
50 | 51 |
51 void ReadMetadata(const AttachmentIdList& ids, | 52 void ReadMetadata(const AttachmentIdList& ids, |
52 const AttachmentStore::ReadMetadataCallback& callback); | 53 const AttachmentStore::ReadMetadataCallback& callback); |
53 | 54 |
54 void ReadAllMetadata(AttachmentStore::AttachmentReferrer referrer, | 55 void ReadAllMetadata(AttachmentStore::Component component, |
55 const AttachmentStore::ReadMetadataCallback& callback); | 56 const AttachmentStore::ReadMetadataCallback& callback); |
56 | 57 |
57 private: | 58 private: |
58 friend class base::RefCounted<AttachmentStoreFrontend>; | 59 friend class base::RefCounted<AttachmentStoreFrontend>; |
59 virtual ~AttachmentStoreFrontend(); | 60 virtual ~AttachmentStoreFrontend(); |
60 | 61 |
61 scoped_ptr<AttachmentStoreBackend> backend_; | 62 scoped_ptr<AttachmentStoreBackend> backend_; |
62 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_; | 63 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend); | 65 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace syncer | 68 } // namespace syncer |
68 | 69 |
69 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ | 70 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ |
OLD | NEW |