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

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

Issue 1421003007: [Sync] Componentize ProfileSyncComponentsFactoryImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser_tests Created 5 years, 1 month 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 COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
7 7
8 #include "components/sync_driver/sync_client.h" 8 #include "components/sync_driver/sync_client.h"
9 9
10 namespace sync_driver { 10 namespace sync_driver {
11 class FakeSyncService; 11 class FakeSyncService;
12 12
13 // Fake implementation of SyncClient interface for tests. 13 // Fake implementation of SyncClient interface for tests.
14 class FakeSyncClient : public SyncClient { 14 class FakeSyncClient : public SyncClient {
15 public: 15 public:
16 FakeSyncClient(); 16 FakeSyncClient();
17 explicit FakeSyncClient(SyncApiComponentFactory* factory); 17 explicit FakeSyncClient(SyncApiComponentFactory* factory);
18 ~FakeSyncClient() override; 18 ~FakeSyncClient() override;
19 19
20 void Initialize(SyncService* sync_service) override; 20 void Initialize(scoped_ptr<SyncApiComponentFactory> factory,
21 SyncService* sync_service) override;
21 22
22 SyncService* GetSyncService() override; 23 SyncService* GetSyncService() override;
23 PrefService* GetPrefService() override; 24 PrefService* GetPrefService() override;
24 bookmarks::BookmarkModel* GetBookmarkModel() override; 25 bookmarks::BookmarkModel* GetBookmarkModel() override;
25 favicon::FaviconService* GetFaviconService() override; 26 favicon::FaviconService* GetFaviconService() override;
26 history::HistoryService* GetHistoryService() override; 27 history::HistoryService* GetHistoryService() override;
27 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; 28 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override;
28 ClearBrowsingDataCallback GetClearBrowsingDataCallback() override; 29 ClearBrowsingDataCallback GetClearBrowsingDataCallback() override;
29 base::Closure GetPasswordStateChangedCallback() override; 30 base::Closure GetPasswordStateChangedCallback() override;
31 sync_driver::SyncApiComponentFactory::RegisterDataTypesMethod
32 GetRegisterPlatformTypesCallback() override;
30 autofill::PersonalDataManager* GetPersonalDataManager() override; 33 autofill::PersonalDataManager* GetPersonalDataManager() override;
31 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; 34 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override;
32 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; 35 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override;
33 invalidation::InvalidationService* GetInvalidationService() override; 36 invalidation::InvalidationService* GetInvalidationService() override;
34 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; 37 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override;
35 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; 38 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override;
36 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 39 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
37 syncer::ModelType type) override; 40 syncer::ModelType type) override;
38 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( 41 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup(
39 syncer::ModelSafeGroup group, 42 syncer::ModelSafeGroup group,
40 syncer::WorkerLoopDestructionObserver* observer) override; 43 syncer::WorkerLoopDestructionObserver* observer) override;
41 SyncApiComponentFactory* GetSyncApiComponentFactory() override; 44 SyncApiComponentFactory* GetSyncApiComponentFactory() override;
42 45
43 private: 46 private:
44 SyncApiComponentFactory* factory_; 47 SyncApiComponentFactory* factory_;
45 scoped_ptr<FakeSyncService> sync_service_; 48 scoped_ptr<FakeSyncService> sync_service_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); 50 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient);
48 }; 51 };
49 52
50 } // namespace sync_driver 53 } // namespace sync_driver
51 54
52 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ 55 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698