OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ |
6 #define COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ | 6 #define COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "components/sync/api/attachments/attachment.h" | |
15 #include "components/sync/api/attachments/attachment_id.h" | |
16 #include "components/sync/api/attachments/attachment_store.h" | |
17 #include "components/sync/engine/attachments/attachment_store_backend.h" | 14 #include "components/sync/engine/attachments/attachment_store_backend.h" |
| 15 #include "components/sync/model/attachments/attachment.h" |
| 16 #include "components/sync/model/attachments/attachment_id.h" |
| 17 #include "components/sync/model/attachments/attachment_store.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class SequencedTaskRunner; | 20 class SequencedTaskRunner; |
21 } // namespace base | 21 } // namespace base |
22 | 22 |
23 namespace syncer { | 23 namespace syncer { |
24 | 24 |
25 // An in-memory implementation of AttachmentStore used for testing. | 25 // An in-memory implementation of AttachmentStore used for testing. |
26 // InMemoryAttachmentStore is not threadsafe, it lives on backend thread and | 26 // InMemoryAttachmentStore is not threadsafe, it lives on backend thread and |
27 // posts callbacks with results on |callback_task_runner|. | 27 // posts callbacks with results on |callback_task_runner|. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 typedef std::map<AttachmentId, AttachmentEntry> AttachmentEntryMap; | 67 typedef std::map<AttachmentId, AttachmentEntry> AttachmentEntryMap; |
68 AttachmentEntryMap attachments_; | 68 AttachmentEntryMap attachments_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(InMemoryAttachmentStore); | 70 DISALLOW_COPY_AND_ASSIGN(InMemoryAttachmentStore); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace syncer | 73 } // namespace syncer |
74 | 74 |
75 #endif // COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ | 75 #endif // COMPONENTS_SYNC_ENGINE_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ |
OLD | NEW |