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: ios/chrome/browser/sync/ios_chrome_sync_client.h

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__ 5 #ifndef IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__
6 #define IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__ 6 #define IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "components/sync_driver/sync_client.h" 13 #include "components/sync_driver/sync_client.h"
13 14
14 namespace autofill { 15 namespace autofill {
15 class AutofillWebDataService; 16 class AutofillWebDataService;
16 } 17 }
17 18
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 53 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
53 syncer::ModelType type) override; 54 syncer::ModelType type) override;
54 syncer_v2::ModelTypeService* GetModelTypeServiceForType( 55 syncer_v2::ModelTypeService* GetModelTypeServiceForType(
55 syncer::ModelType type) override; 56 syncer::ModelType type) override;
56 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( 57 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup(
57 syncer::ModelSafeGroup group, 58 syncer::ModelSafeGroup group,
58 syncer::WorkerLoopDestructionObserver* observer) override; 59 syncer::WorkerLoopDestructionObserver* observer) override;
59 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override; 60 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override;
60 61
61 void SetSyncApiComponentFactoryForTesting( 62 void SetSyncApiComponentFactoryForTesting(
62 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory); 63 std::unique_ptr<sync_driver::SyncApiComponentFactory> component_factory);
63 64
64 // Iterates over browser states and returns any trackers that can be found. 65 // Iterates over browser states and returns any trackers that can be found.
65 static void GetDeviceInfoTrackers( 66 static void GetDeviceInfoTrackers(
66 std::vector<const sync_driver::DeviceInfoTracker*>* trackers); 67 std::vector<const sync_driver::DeviceInfoTracker*>* trackers);
67 68
68 private: 69 private:
69 ios::ChromeBrowserState* const browser_state_; 70 ios::ChromeBrowserState* const browser_state_;
70 71
71 // The sync api component factory in use by this client. 72 // The sync api component factory in use by this client.
72 scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory_; 73 std::unique_ptr<sync_driver::SyncApiComponentFactory> component_factory_;
73 74
74 // Members that must be fetched on the UI thread but accessed on their 75 // Members that must be fetched on the UI thread but accessed on their
75 // respective backend threads. 76 // respective backend threads.
76 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; 77 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
77 scoped_refptr<password_manager::PasswordStore> password_store_; 78 scoped_refptr<password_manager::PasswordStore> password_store_;
78 79
79 scoped_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_; 80 std::unique_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_;
80 81
81 const scoped_refptr<syncer::ExtensionsActivity> dummy_extensions_activity_; 82 const scoped_refptr<syncer::ExtensionsActivity> dummy_extensions_activity_;
82 83
83 base::WeakPtrFactory<IOSChromeSyncClient> weak_ptr_factory_; 84 base::WeakPtrFactory<IOSChromeSyncClient> weak_ptr_factory_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncClient); 86 DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncClient);
86 }; 87 };
87 88
88 #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__ 89 #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_SYNC_CLIENT_H__
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc ('k') | ios/chrome/browser/sync/ios_chrome_sync_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698