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

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

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 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "components/sync_driver/data_type_controller.h" 10 #include "components/sync_driver/data_type_controller.h"
10 #include "components/sync_driver/data_type_error_handler.h" 11 #include "components/sync_driver/data_type_error_handler.h"
11 #include "components/sync_driver/sync_api_component_factory.h" 12 #include "components/sync_driver/sync_api_component_factory.h"
12 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
13 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
14 15
15 namespace sync_driver { 16 namespace sync_driver {
16 class AssociatorInterface; 17 class AssociatorInterface;
17 class ChangeProcessor; 18 class ChangeProcessor;
18 class DataTypeEncryptionHandler; 19 class DataTypeEncryptionHandler;
(...skipping 20 matching lines...) Expand all
39 const sync_driver::DataTypeEncryptionHandler*, 40 const sync_driver::DataTypeEncryptionHandler*,
40 browser_sync::SyncBackendHost*, 41 browser_sync::SyncBackendHost*,
41 sync_driver::DataTypeManagerObserver* observer)); 42 sync_driver::DataTypeManagerObserver* observer));
42 MOCK_METHOD4(CreateSyncBackendHost, 43 MOCK_METHOD4(CreateSyncBackendHost,
43 browser_sync::SyncBackendHost*( 44 browser_sync::SyncBackendHost*(
44 const std::string& name, 45 const std::string& name,
45 invalidation::InvalidationService* invalidator, 46 invalidation::InvalidationService* invalidator,
46 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, 47 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
47 const base::FilePath& sync_folder)); 48 const base::FilePath& sync_folder));
48 49
49 scoped_ptr<sync_driver::LocalDeviceInfoProvider> 50 std::unique_ptr<sync_driver::LocalDeviceInfoProvider>
50 CreateLocalDeviceInfoProvider() override; 51 CreateLocalDeviceInfoProvider() override;
51 void SetLocalDeviceInfoProvider( 52 void SetLocalDeviceInfoProvider(
52 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device); 53 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device);
53 54
54 scoped_ptr<syncer::AttachmentService> CreateAttachmentService( 55 std::unique_ptr<syncer::AttachmentService> CreateAttachmentService(
55 scoped_ptr<syncer::AttachmentStoreForSync> attachment_store, 56 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store,
56 const syncer::UserShare& user_share, 57 const syncer::UserShare& user_share,
57 const std::string& store_birthday, 58 const std::string& store_birthday,
58 syncer::ModelType model_type, 59 syncer::ModelType model_type,
59 syncer::AttachmentService::Delegate* delegate) override; 60 syncer::AttachmentService::Delegate* delegate) override;
60 MOCK_METHOD2(CreateBookmarkSyncComponents, 61 MOCK_METHOD2(CreateBookmarkSyncComponents,
61 SyncComponents(sync_driver::SyncService* sync_service, 62 SyncComponents(sync_driver::SyncService* sync_service,
62 sync_driver::DataTypeErrorHandler* error_handler)); 63 sync_driver::DataTypeErrorHandler* error_handler));
63 MOCK_METHOD3(CreateTypedUrlSyncComponents, 64 MOCK_METHOD3(CreateTypedUrlSyncComponents,
64 SyncComponents( 65 SyncComponents(
65 sync_driver::SyncService* sync_service, 66 sync_driver::SyncService* sync_service,
66 history::HistoryBackend* history_backend, 67 history::HistoryBackend* history_backend,
67 sync_driver::DataTypeErrorHandler* error_handler)); 68 sync_driver::DataTypeErrorHandler* error_handler));
68 69
69 private: 70 private:
70 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); 71 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents();
71 72
72 scoped_ptr<sync_driver::AssociatorInterface> model_associator_; 73 std::unique_ptr<sync_driver::AssociatorInterface> model_associator_;
73 scoped_ptr<sync_driver::ChangeProcessor> change_processor_; 74 std::unique_ptr<sync_driver::ChangeProcessor> change_processor_;
74 // LocalDeviceInfoProvider is initially owned by this class, 75 // LocalDeviceInfoProvider is initially owned by this class,
75 // transferred to caller when CreateLocalDeviceInfoProvider is called. 76 // transferred to caller when CreateLocalDeviceInfoProvider is called.
76 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; 77 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device_;
77 }; 78 };
78 79
79 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ 80 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__
OLDNEW
« no previous file with comments | « components/sync_driver/sync_api_component_factory.h ('k') | components/sync_driver/sync_api_component_factory_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698