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

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

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments Created 5 years, 3 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 "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 12
12 // Fake implementation of SyncClient interface for tests. 13 // Fake implementation of SyncClient interface for tests.
13 class FakeSyncClient : public SyncClient { 14 class FakeSyncClient : public SyncClient {
14 public: 15 public:
15 FakeSyncClient(); 16 FakeSyncClient();
16 explicit FakeSyncClient(SyncApiComponentFactory* factory); 17 explicit FakeSyncClient(SyncApiComponentFactory* factory);
17 ~FakeSyncClient() override; 18 ~FakeSyncClient() override;
18 19
19 SyncService* GetSyncService() override; 20 SyncService* GetSyncService() override;
20 PrefService* GetPrefService() override; 21 PrefService* GetPrefService() override;
21 bookmarks::BookmarkModel* GetBookmarkModel() override; 22 bookmarks::BookmarkModel* GetBookmarkModel() override;
22 history::HistoryService* GetHistoryService() override; 23 history::HistoryService* GetHistoryService() override;
23 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override; 24 scoped_refptr<password_manager::PasswordStore> GetPasswordStore() override;
24 autofill::PersonalDataManager* GetPersonalDataManager() override; 25 autofill::PersonalDataManager* GetPersonalDataManager() override;
25 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override; 26 scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override;
26 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 27 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
27 syncer::ModelType type) override; 28 syncer::ModelType type) override;
28 SyncApiComponentFactory* GetSyncApiComponentFactory() override; 29 SyncApiComponentFactory* GetSyncApiComponentFactory() override;
29 30
30 private: 31 private:
31 SyncApiComponentFactory* factory_; 32 SyncApiComponentFactory* factory_;
33 scoped_ptr<FakeSyncService> sync_service_;
32 34
33 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); 35 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient);
34 }; 36 };
35 37
36 } // namespace sync_driver 38 } // namespace sync_driver
37 39
38 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ 40 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
OLDNEW
« no previous file with comments | « components/sync_driver/fake_data_type_controller.cc ('k') | components/sync_driver/fake_sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698