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

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

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "components/sync_driver/sync_client.h"
12 #include "components/syncable_prefs/testing_pref_service_syncable.h"
13
14 namespace sync_driver {
15 class FakeSyncService;
16
17 // Fake implementation of SyncClient interface for tests.
18 class FakeSyncClient : public SyncClient {
19 public:
20 FakeSyncClient();
21 explicit FakeSyncClient(SyncApiComponentFactory* factory);
22 ~FakeSyncClient() override;
23
24 void Initialize() override;
25
26 SyncService* GetSyncService() override;
27 PrefService* GetPrefService() override;
28 bookmarks::BookmarkModel* GetBookmarkModel() override;
29 favicon::FaviconService* GetFaviconService() override;
30 history::HistoryService* GetHistoryService() override;
31 base::Closure GetPasswordStateChangedCallback() override;
32 sync_driver::SyncApiComponentFactory::RegisterDataTypesMethod
33 GetRegisterPlatformTypesCallback() override;
34 autofill::PersonalDataManager* GetPersonalDataManager() override;
35 BookmarkUndoService* GetBookmarkUndoServiceIfExists() override;
36 invalidation::InvalidationService* GetInvalidationService() override;
37 scoped_refptr<syncer::ExtensionsActivity> GetExtensionsActivity() override;
38 sync_sessions::SyncSessionsClient* GetSyncSessionsClient() override;
39 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
40 syncer::ModelType type) override;
41 syncer_v2::ModelTypeService* GetModelTypeServiceForType(
42 syncer::ModelType type) override;
43 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup(
44 syncer::ModelSafeGroup group,
45 syncer::WorkerLoopDestructionObserver* observer) override;
46 SyncApiComponentFactory* GetSyncApiComponentFactory() override;
47
48 void SetModelTypeService(syncer_v2::ModelTypeService* model_type_service);
49
50 private:
51 syncable_prefs::TestingPrefServiceSyncable pref_service_;
52 syncer_v2::ModelTypeService* model_type_service_;
53 SyncApiComponentFactory* factory_;
54 std::unique_ptr<FakeSyncService> sync_service_;
55
56 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient);
57 };
58
59 } // namespace sync_driver
60
61 #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