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

Side by Side Diff: components/sync/api/attachments/attachment_service.cc

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 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
OLDNEW
(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 <utility>
8
9 #include "base/memory/ptr_util.h"
10 #include "components/sync/api/attachments/attachment_store.h"
11 #include "components/sync/api_impl/attachments/attachment_service_impl.h"
12 #include "components/sync/engine/attachments/fake_attachment_downloader.h"
13 #include "components/sync/engine/attachments/fake_attachment_uploader.h"
14
15 namespace syncer {
16
17 // static
18 std::unique_ptr<AttachmentService> AttachmentService::Create(
19 std::unique_ptr<AttachmentStoreForSync> attachment_store,
20 std::unique_ptr<AttachmentUploader> attachment_uploader,
21 std::unique_ptr<AttachmentDownloader> attachment_downloader,
22 Delegate* delegate,
23 const base::TimeDelta& initial_backoff_delay,
24 const base::TimeDelta& max_backoff_delay) {
25 return base::MakeUnique<AttachmentServiceImpl>(
26 std::move(attachment_store), std::move(attachment_uploader),
27 std::move(attachment_downloader), delegate, initial_backoff_delay,
28 max_backoff_delay);
29 }
30
31 // static
32 std::unique_ptr<AttachmentService> AttachmentService::CreateForTest() {
33 std::unique_ptr<AttachmentStore> attachment_store =
34 AttachmentStore::CreateInMemoryStore();
35 return base::MakeUnique<AttachmentServiceImpl>(
36 attachment_store->CreateAttachmentStoreForSync(),
37 base::MakeUnique<FakeAttachmentUploader>(),
38 base::MakeUnique<FakeAttachmentDownloader>(), nullptr, base::TimeDelta(),
39 base::TimeDelta());
40 }
41
42 AttachmentService::~AttachmentService() {}
43
44 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/api/attachments/attachment_service.h ('k') | components/sync/api/attachments/attachment_service_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698