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

Side by Side Diff: components/sync_driver/sync_api_component_factory_mock.cc

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback Created 4 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/sync_driver/sync_api_component_factory_mock.h" 5 #include "components/sync_driver/sync_api_component_factory_mock.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/sync_driver/change_processor.h" 9 #include "components/sync_driver/change_processor.h"
10 #include "components/sync_driver/local_device_info_provider_mock.h" 10 #include "components/sync_driver/local_device_info_provider_mock.h"
(...skipping 18 matching lines...) Expand all
29 local_device_(new sync_driver::LocalDeviceInfoProviderMock()) { 29 local_device_(new sync_driver::LocalDeviceInfoProviderMock()) {
30 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). 30 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)).
31 WillByDefault( 31 WillByDefault(
32 InvokeWithoutArgs( 32 InvokeWithoutArgs(
33 this, 33 this,
34 &SyncApiComponentFactoryMock::MakeSyncComponents)); 34 &SyncApiComponentFactoryMock::MakeSyncComponents));
35 } 35 }
36 36
37 SyncApiComponentFactoryMock::~SyncApiComponentFactoryMock() {} 37 SyncApiComponentFactoryMock::~SyncApiComponentFactoryMock() {}
38 38
39 scoped_ptr<syncer::AttachmentService> 39 std::unique_ptr<syncer::AttachmentService>
40 SyncApiComponentFactoryMock::CreateAttachmentService( 40 SyncApiComponentFactoryMock::CreateAttachmentService(
41 scoped_ptr<syncer::AttachmentStoreForSync> attachment_store, 41 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store,
42 const syncer::UserShare& user_share, 42 const syncer::UserShare& user_share,
43 const std::string& store_birthday, 43 const std::string& store_birthday,
44 syncer::ModelType model_type, 44 syncer::ModelType model_type,
45 syncer::AttachmentService::Delegate* delegate) { 45 syncer::AttachmentService::Delegate* delegate) {
46 return syncer::AttachmentServiceImpl::CreateForTest(); 46 return syncer::AttachmentServiceImpl::CreateForTest();
47 } 47 }
48 48
49 sync_driver::SyncApiComponentFactory::SyncComponents 49 sync_driver::SyncApiComponentFactory::SyncComponents
50 SyncApiComponentFactoryMock::MakeSyncComponents() { 50 SyncApiComponentFactoryMock::MakeSyncComponents() {
51 return sync_driver::SyncApiComponentFactory::SyncComponents( 51 return sync_driver::SyncApiComponentFactory::SyncComponents(
52 model_associator_.release(), change_processor_.release()); 52 model_associator_.release(), change_processor_.release());
53 } 53 }
54 54
55 scoped_ptr<sync_driver::LocalDeviceInfoProvider> 55 std::unique_ptr<sync_driver::LocalDeviceInfoProvider>
56 SyncApiComponentFactoryMock::CreateLocalDeviceInfoProvider() { 56 SyncApiComponentFactoryMock::CreateLocalDeviceInfoProvider() {
57 return std::move(local_device_); 57 return std::move(local_device_);
58 } 58 }
59 59
60 void SyncApiComponentFactoryMock::SetLocalDeviceInfoProvider( 60 void SyncApiComponentFactoryMock::SetLocalDeviceInfoProvider(
61 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device) { 61 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device) {
62 local_device_ = std::move(local_device); 62 local_device_ = std::move(local_device);
63 } 63 }
OLDNEW
« no previous file with comments | « components/sync_driver/sync_api_component_factory_mock.h ('k') | components/sync_driver/sync_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698