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

Side by Side Diff: ios/chrome/browser/sync/ios_chrome_sync_client.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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
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 <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "components/sync/driver/sync_client.h" 13 #include "components/sync/driver/sync_client.h"
14 14
15 namespace autofill { 15 namespace autofill {
16 class AutofillWebDataService; 16 class AutofillWebDataService;
17 } 17 }
18 18
19 namespace ios { 19 namespace ios {
20 class ChromeBrowserState; 20 class ChromeBrowserState;
21 } 21 }
22 22
23 namespace password_manager { 23 namespace password_manager {
24 class PasswordStore; 24 class PasswordStore;
25 } 25 }
26 26
27 namespace syncer { 27 namespace sync_driver {
28 class DeviceInfoTracker; 28 class DeviceInfoTracker;
29 class SyncApiComponentFactory; 29 class SyncApiComponentFactory;
30 class SyncService; 30 class SyncService;
31 } 31 }
32 32
33 class IOSChromeSyncClient : public syncer::SyncClient { 33 class IOSChromeSyncClient : public sync_driver::SyncClient {
34 public: 34 public:
35 explicit IOSChromeSyncClient(ios::ChromeBrowserState* browser_state); 35 explicit IOSChromeSyncClient(ios::ChromeBrowserState* browser_state);
36 ~IOSChromeSyncClient() override; 36 ~IOSChromeSyncClient() override;
37 37
38 // SyncClient implementation. 38 // SyncClient implementation.
39 void Initialize() override; 39 void Initialize() override;
40 syncer::SyncService* GetSyncService() override; 40 sync_driver::SyncService* GetSyncService() override;
41 PrefService* GetPrefService() override; 41 PrefService* GetPrefService() override;
42 bookmarks::BookmarkModel* GetBookmarkModel() override; 42 bookmarks::BookmarkModel* GetBookmarkModel() override;
43 favicon::FaviconService* GetFaviconService() override; 43 favicon::FaviconService* GetFaviconService() override;
44 history::HistoryService* GetHistoryService() override; 44 history::HistoryService* GetHistoryService() override;
45 base::Closure GetPasswordStateChangedCallback() override; 45 base::Closure GetPasswordStateChangedCallback() override;
46 syncer::SyncApiComponentFactory::RegisterDataTypesMethod 46 sync_driver::SyncApiComponentFactory::RegisterDataTypesMethod
47 GetRegisterPlatformTypesCallback() override; 47 GetRegisterPlatformTypesCallback() override;
48 autofill::PersonalDataManager* GetPersonalDataManager() override; 48 autofill::PersonalDataManager* GetPersonalDataManager() override;
49 invalidation::InvalidationService* GetInvalidationService() override; 49 invalidation::InvalidationService* GetInvalidationService() override;
50 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; 50 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override;
51 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; 51 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override;
52 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; 52 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override;
53 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 53 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
54 syncer::ModelType type) override; 54 syncer::ModelType type) override;
55 base::WeakPtr<syncer::ModelTypeService> GetModelTypeServiceForType( 55 base::WeakPtr<syncer_v2::ModelTypeService> GetModelTypeServiceForType(
56 syncer::ModelType type) override; 56 syncer::ModelType type) override;
57 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( 57 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup(
58 syncer::ModelSafeGroup group, 58 syncer::ModelSafeGroup group,
59 syncer::WorkerLoopDestructionObserver* observer) override; 59 syncer::WorkerLoopDestructionObserver* observer) override;
60 syncer::SyncApiComponentFactory* GetSyncApiComponentFactory() override; 60 sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override;
61 61
62 void SetSyncApiComponentFactoryForTesting( 62 void SetSyncApiComponentFactoryForTesting(
63 std::unique_ptr<syncer::SyncApiComponentFactory> component_factory); 63 std::unique_ptr<sync_driver::SyncApiComponentFactory> component_factory);
64 64
65 // 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.
66 static void GetDeviceInfoTrackers( 66 static void GetDeviceInfoTrackers(
67 std::vector<const syncer::DeviceInfoTracker*>* trackers); 67 std::vector<const sync_driver::DeviceInfoTracker*>* trackers);
68 68
69 private: 69 private:
70 ios::ChromeBrowserState* const browser_state_; 70 ios::ChromeBrowserState* const browser_state_;
71 71
72 // The sync api component factory in use by this client. 72 // The sync api component factory in use by this client.
73 std::unique_ptr<syncer::SyncApiComponentFactory> component_factory_; 73 std::unique_ptr<sync_driver::SyncApiComponentFactory> component_factory_;
74 74
75 // 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
76 // respective backend threads. 76 // respective backend threads.
77 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; 77 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
78 scoped_refptr<password_manager::PasswordStore> password_store_; 78 scoped_refptr<password_manager::PasswordStore> password_store_;
79 79
80 std::unique_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_; 80 std::unique_ptr<sync_sessions::SyncSessionsClient> sync_sessions_client_;
81 81
82 const scoped_refptr<syncer::ExtensionsActivity> dummy_extensions_activity_; 82 const scoped_refptr<syncer::ExtensionsActivity> dummy_extensions_activity_;
83 83
84 base::WeakPtrFactory<IOSChromeSyncClient> weak_ptr_factory_; 84 base::WeakPtrFactory<IOSChromeSyncClient> weak_ptr_factory_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncClient); 86 DISALLOW_COPY_AND_ASSIGN(IOSChromeSyncClient);
87 }; 87 };
88 88
89 #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