OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/sync/api/attachments/attachment_service.h" | |
6 | |
7 #include "base/memory/ptr_util.h" | |
8 #include "components/sync/api/attachments/attachment_store.h" | |
9 #include "components/sync/api_impl/attachments/attachment_service_impl.h" | |
10 #include "components/sync/engine/attachments/fake_attachment_downloader.h" | |
11 #include "components/sync/engine/attachments/fake_attachment_uploader.h" | |
12 | |
13 namespace syncer { | |
14 | |
15 // static | |
16 std::unique_ptr<AttachmentService> AttachmentService::Create( | |
17 std::unique_ptr<AttachmentStoreForSync> attachment_store, | |
18 std::unique_ptr<AttachmentUploader> attachment_uploader, | |
19 std::unique_ptr<AttachmentDownloader> attachment_downloader, | |
20 Delegate* delegate, | |
21 const base::TimeDelta& initial_backoff_delay, | |
22 const base::TimeDelta& max_backoff_delay) { | |
23 return base::MakeUnique<AttachmentServiceImpl>( | |
24 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
| |
25 std::move(attachment_downloader), delegate, initial_backoff_delay, | |
26 max_backoff_delay); | |
27 } | |
28 | |
29 // static | |
30 std::unique_ptr<AttachmentService> AttachmentService::CreateForTest() { | |
31 std::unique_ptr<AttachmentStore> attachment_store = | |
32 AttachmentStore::CreateInMemoryStore(); | |
33 return base::MakeUnique<AttachmentServiceImpl>( | |
34 attachment_store->CreateAttachmentStoreForSync(), | |
35 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!
| |
36 base::MakeUnique<FakeAttachmentDownloader>(), nullptr, base::TimeDelta(), | |
37 base::TimeDelta()); | |
38 } | |
39 | |
40 AttachmentService::~AttachmentService() {} | |
41 | |
42 } // namespace syncer | |
OLD | NEW |