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

Unified Diff: sync/api/attachments/attachment_store.cc

Issue 601553004: Refactor FakeAttachmentStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sync/api/attachments/attachment_store.cc
diff --git a/sync/api/attachments/attachment_store.cc b/sync/api/attachments/attachment_store.cc
index e22b040e3dec3e691b35179b5dc3bae05bb18927..6bf4aad53101689d0dc63253ecbdbf4abf7118b1 100644
--- a/sync/api/attachments/attachment_store.cc
+++ b/sync/api/attachments/attachment_store.cc
@@ -4,9 +4,24 @@
#include "sync/api/attachments/attachment_store.h"
+#include "base/thread_task_runner_handle.h"
+#include "sync/internal_api/public/attachments/attachment_store_proxy.h"
+#include "sync/internal_api/public/attachments/in_memory_attachment_store.h"
+
namespace syncer {
+AttachmentStoreBase::AttachmentStoreBase() {}
+AttachmentStoreBase::~AttachmentStoreBase() {}
+
AttachmentStore::AttachmentStore() {}
AttachmentStore::~AttachmentStore() {}
+scoped_refptr<AttachmentStore> AttachmentStore::CreateInMemoryStore() {
+ // Both frontend and backend of attachment store will live on current thread.
+ scoped_ptr<AttachmentStoreBase> backend(
+ new InMemoryAttachmentStore(base::ThreadTaskRunnerHandle::Get()));
+ return scoped_refptr<AttachmentStore>(new AttachmentStoreProxy(
+ backend.Pass(), base::ThreadTaskRunnerHandle::Get()));
+}
+
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698