Index: components/sync/api/attachments/attachment_service.cc |
diff --git a/components/sync/api/attachments/attachment_service.cc b/components/sync/api/attachments/attachment_service.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cb5dd3a09c3be5ea2f4d08b2e0166be05ca18a22 |
--- /dev/null |
+++ b/components/sync/api/attachments/attachment_service.cc |
@@ -0,0 +1,42 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "components/sync/api/attachments/attachment_service.h" |
+ |
+#include "base/memory/ptr_util.h" |
+#include "components/sync/api/attachments/attachment_store.h" |
+#include "components/sync/api_impl/attachments/attachment_service_impl.h" |
+#include "components/sync/engine/attachments/fake_attachment_downloader.h" |
+#include "components/sync/engine/attachments/fake_attachment_uploader.h" |
+ |
+namespace syncer { |
+ |
+// static |
+std::unique_ptr<AttachmentService> AttachmentService::Create( |
+ std::unique_ptr<AttachmentStoreForSync> attachment_store, |
+ std::unique_ptr<AttachmentUploader> attachment_uploader, |
+ std::unique_ptr<AttachmentDownloader> attachment_downloader, |
+ Delegate* delegate, |
+ const base::TimeDelta& initial_backoff_delay, |
+ const base::TimeDelta& max_backoff_delay) { |
+ return base::MakeUnique<AttachmentServiceImpl>( |
+ std::move(attachment_store), std::move(attachment_uploader), |
skym
2016/10/07 18:22:16
Shouldn't you have #include <utility> for these st
maxbogue
2016/10/07 19:21:50
Done. Apparently I hadn't... added <memory> in att
|
+ std::move(attachment_downloader), delegate, initial_backoff_delay, |
+ max_backoff_delay); |
+} |
+ |
+// static |
+std::unique_ptr<AttachmentService> AttachmentService::CreateForTest() { |
+ std::unique_ptr<AttachmentStore> attachment_store = |
+ AttachmentStore::CreateInMemoryStore(); |
+ return base::MakeUnique<AttachmentServiceImpl>( |
+ attachment_store->CreateAttachmentStoreForSync(), |
+ base::MakeUnique<FakeAttachmentUploader>(), |
skym
2016/10/07 18:22:16
Shouldn't you have #include "base/memory/ptr_util.
maxbogue
2016/10/07 19:21:50
It's there!
|
+ base::MakeUnique<FakeAttachmentDownloader>(), nullptr, base::TimeDelta(), |
+ base::TimeDelta()); |
+} |
+ |
+AttachmentService::~AttachmentService() {} |
+ |
+} // namespace syncer |