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

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

Issue 1158223003: [iOS] Add FakeSyncService and factory for testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 6 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
« no previous file with comments | « components/sync_driver/DEPS ('k') | components/sync_driver/fake_sync_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SERVICE_H_
6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_
7
8 #include "components/sync_driver/sync_service.h"
9 #include "google_apis/gaia/google_service_auth_error.h"
10
11 namespace sync_driver {
12
13 // Fake implementation of sync_driver::SyncService, used for testing.
14 class FakeSyncService : public sync_driver::SyncService {
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 RequestStop() override;
31 void RequestStart() 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 } // namespace sync_driver
59
60 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sync_driver/DEPS ('k') | components/sync_driver/fake_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698