OLD | NEW |
---|---|
(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 IOS_PUBLIC_TEST_FAKE_SYNC_SERVICE_H_ | |
6 #define IOS_PUBLIC_TEST_FAKE_SYNC_SERVICE_H_ | |
7 | |
8 #include "components/keyed_service/core/keyed_service.h" | |
9 #include "components/sync_driver/sync_service.h" | |
10 #include "google_apis/gaia/google_service_auth_error.h" | |
11 #include "ios/public/test/fake_sync_service.h" | |
12 | |
13 // Fake implementation of sync_driver::SyncService, used for testing. | |
14 class FakeSyncService : public sync_driver::SyncService, public KeyedService { | |
sdefresne
2015/06/08 16:24:17
Could you get this moved into //components/sync_dr
| |
15 public: | |
16 FakeSyncService(); | |
17 ~FakeSyncService() override; | |
18 | |
19 private: | |
20 // sync_driver::SyncService: | |
21 bool HasSyncSetupCompleted() const override; | |
22 bool IsSyncActive() const override; | |
23 syncer::ModelTypeSet GetActiveDataTypes() const override; | |
24 void AddObserver(sync_driver::SyncServiceObserver* observer) override; | |
25 void RemoveObserver(sync_driver::SyncServiceObserver* observer) override; | |
26 bool HasObserver( | |
27 const sync_driver::SyncServiceObserver* observer) const override; | |
28 bool IsSyncEnabledAndLoggedIn() override; | |
29 void DisableForUser() override; | |
30 void StopAndSuppress() override; | |
31 void UnsuppressAndStart() override; | |
32 syncer::ModelTypeSet GetPreferredDataTypes() const override; | |
33 void OnUserChoseDatatypes(bool sync_everything, | |
34 syncer::ModelTypeSet chosen_types) override; | |
35 void SetSyncSetupCompleted() override; | |
36 bool FirstSetupInProgress() const override; | |
37 void SetSetupInProgress(bool setup_in_progress) override; | |
38 bool setup_in_progress() const override; | |
39 bool ConfigurationDone() const override; | |
40 const GoogleServiceAuthError& GetAuthError() const override; | |
41 bool HasUnrecoverableError() const override; | |
42 bool backend_initialized() const override; | |
43 bool IsPassphraseRequiredForDecryption() const override; | |
44 base::Time GetExplicitPassphraseTime() const override; | |
45 bool IsUsingSecondaryPassphrase() const override; | |
46 void EnableEncryptEverything() override; | |
47 void SetEncryptionPassphrase(const std::string& passphrase, | |
48 PassphraseType type) override; | |
49 bool SetDecryptionPassphrase(const std::string& passphrase) override; | |
50 | |
51 // sync_driver::DataTypeEncryptionHandler: | |
52 bool IsPassphraseRequired() const override; | |
53 syncer::ModelTypeSet GetEncryptedDataTypes() const override; | |
54 | |
55 GoogleServiceAuthError error_; | |
56 }; | |
57 | |
58 #endif // IOS_PUBLIC_TEST_FAKE_SYNC_SERVICE_H_ | |
OLD | NEW |