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

Side by Side Diff: components/sync/driver/fake_sync_client.h

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. 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 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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/sync/driver/sync_client.h" 11 #include "components/sync/driver/sync_client.h"
12 #include "components/syncable_prefs/testing_pref_service_syncable.h" 12 #include "components/syncable_prefs/testing_pref_service_syncable.h"
13 13
14 namespace sync_driver { 14 namespace syncer {
15
15 class FakeSyncService; 16 class FakeSyncService;
16 17
17 // Fake implementation of SyncClient interface for tests. 18 // Fake implementation of SyncClient interface for tests.
18 class FakeSyncClient : public SyncClient { 19 class FakeSyncClient : public SyncClient {
19 public: 20 public:
20 FakeSyncClient(); 21 FakeSyncClient();
21 explicit FakeSyncClient(SyncApiComponentFactory* factory); 22 explicit FakeSyncClient(SyncApiComponentFactory* factory);
22 ~FakeSyncClient() override; 23 ~FakeSyncClient() override;
23 24
24 void Initialize() override; 25 void Initialize() override;
25 26
26 SyncService* GetSyncService() override; 27 SyncService* GetSyncService() override;
27 PrefService* GetPrefService() override; 28 PrefService* GetPrefService() override;
28 bookmarks::BookmarkModel* GetBookmarkModel() override; 29 bookmarks::BookmarkModel* GetBookmarkModel() override;
29 favicon::FaviconService* GetFaviconService() override; 30 favicon::FaviconService* GetFaviconService() override;
30 history::HistoryService* GetHistoryService() override; 31 history::HistoryService* GetHistoryService() override;
31 base::Closure GetPasswordStateChangedCallback() override; 32 base::Closure GetPasswordStateChangedCallback() override;
32 sync_driver::SyncApiComponentFactory::RegisterDataTypesMethod 33 SyncApiComponentFactory::RegisterDataTypesMethod
33 GetRegisterPlatformTypesCallback() override; 34 GetRegisterPlatformTypesCallback() override;
34 autofill::PersonalDataManager* GetPersonalDataManager() override; 35 autofill::PersonalDataManager* GetPersonalDataManager() override;
35 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override; 36 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override;
36 invalidation::InvalidationService* GetInvalidationService() override; 37 invalidation::InvalidationService* GetInvalidationService() override;
37 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override; 38 scoped_refptr<ExtensionsActivity> GetExtensionsActivity() override;
38 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override; 39 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override;
39 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 40 base::WeakPtr<SyncableService> GetSyncableServiceForType(
40 syncer::ModelType type) override; 41 ModelType type) override;
41 base::WeakPtr<syncer_v2::ModelTypeService> GetModelTypeServiceForType( 42 base::WeakPtr<ModelTypeService> GetModelTypeServiceForType(
42 syncer::ModelType type) override; 43 ModelType type) override;
43 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( 44 scoped_refptr<ModelSafeWorker> CreateModelWorkerForGroup(
44 syncer::ModelSafeGroup group, 45 ModelSafeGroup group,
45 syncer::WorkerLoopDestructionObserver* observer) override; 46 WorkerLoopDestructionObserver* observer) override;
46 SyncApiComponentFactory* GetSyncApiComponentFactory() override; 47 SyncApiComponentFactory* GetSyncApiComponentFactory() override;
47 48
48 void SetModelTypeService(syncer_v2::ModelTypeService* model_type_service); 49 void SetModelTypeService(ModelTypeService* model_type_service);
49 50
50 private: 51 private:
51 syncable_prefs::TestingPrefServiceSyncable pref_service_; 52 syncable_prefs::TestingPrefServiceSyncable pref_service_;
52 syncer_v2::ModelTypeService* model_type_service_; 53 ModelTypeService* model_type_service_;
53 SyncApiComponentFactory* factory_; 54 SyncApiComponentFactory* factory_;
54 std::unique_ptr<FakeSyncService> sync_service_; 55 std::unique_ptr<FakeSyncService> sync_service_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); 57 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient);
57 }; 58 };
58 59
59 } // namespace sync_driver 60 } // namespace syncer
60 61
61 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ 62 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
OLDNEW
« no previous file with comments | « components/sync/driver/fake_generic_change_processor.cc ('k') | components/sync/driver/fake_sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698