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

Side by Side Diff: sync/api/attachments/attachment_store.cc

Issue 601553004: Refactor FakeAttachmentStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Newline Created 6 years, 2 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
« no previous file with comments | « sync/api/attachments/attachment_store.h ('k') | sync/api/attachments/fake_attachment_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « sync/api/attachments/attachment_store.h ('k') | sync/api/attachments/fake_attachment_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698