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 #include "sync/api/attachments/attachment_store.h" | 5 #include "sync/api/attachments/attachment_store.h" |
6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "sync/internal_api/public/attachments/attachment_store_handle.h" |
| 9 #include "sync/internal_api/public/attachments/in_memory_attachment_store.h" |
| 10 |
7 namespace syncer { | 11 namespace syncer { |
8 | 12 |
| 13 AttachmentStoreBase::AttachmentStoreBase() {} |
| 14 AttachmentStoreBase::~AttachmentStoreBase() {} |
| 15 |
9 AttachmentStore::AttachmentStore() {} | 16 AttachmentStore::AttachmentStore() {} |
10 AttachmentStore::~AttachmentStore() {} | 17 AttachmentStore::~AttachmentStore() {} |
11 | 18 |
| 19 scoped_refptr<AttachmentStore> AttachmentStore::CreateInMemoryStore() { |
| 20 // Both frontend and backend of attachment store will live on current thread. |
| 21 scoped_ptr<AttachmentStoreBase> backend( |
| 22 new InMemoryAttachmentStore(base::ThreadTaskRunnerHandle::Get())); |
| 23 return scoped_refptr<AttachmentStore>(new AttachmentStoreHandle( |
| 24 backend.Pass(), base::ThreadTaskRunnerHandle::Get())); |
| 25 } |
| 26 |
12 } // namespace syncer | 27 } // namespace syncer |
OLD | NEW |