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

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: rebase 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
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/fake_sync_service.h"
Nicolas Zea 2015/06/09 21:27:20 Remove?
droger 2015/06/10 09:31:56 Done.
9 #include "components/sync_driver/sync_service.h"
10 #include "google_apis/gaia/google_service_auth_error.h"
11
12 namespace sync_driver {
13
14 // Fake implementation of sync_driver::SyncService, used for testing.
15 class FakeSyncService : public sync_driver::SyncService {
16 public:
17 FakeSyncService();
18 ~FakeSyncService() override;
19
20 private:
21 // sync_driver::SyncService:
22 bool HasSyncSetupCompleted() const override;
23 bool IsSyncActive() const override;
24 syncer::ModelTypeSet GetActiveDataTypes() const override;
25 void AddObserver(sync_driver::SyncServiceObserver* observer) override;
26 void RemoveObserver(sync_driver::SyncServiceObserver* observer) override;
27 bool HasObserver(
28 const sync_driver::SyncServiceObserver* observer) const override;
29 bool IsSyncEnabledAndLoggedIn() override;
30 void DisableForUser() override;
31 void RequestStop() override;
32 void RequestStart() override;
33 syncer::ModelTypeSet GetPreferredDataTypes() const override;
34 void OnUserChoseDatatypes(bool sync_everything,
35 syncer::ModelTypeSet chosen_types) override;
36 void SetSyncSetupCompleted() override;
37 bool FirstSetupInProgress() const override;
38 void SetSetupInProgress(bool setup_in_progress) override;
39 bool setup_in_progress() const override;
40 bool ConfigurationDone() const override;
41 const GoogleServiceAuthError& GetAuthError() const override;
42 bool HasUnrecoverableError() const override;
43 bool backend_initialized() const override;
44 bool IsPassphraseRequiredForDecryption() const override;
45 base::Time GetExplicitPassphraseTime() const override;
46 bool IsUsingSecondaryPassphrase() const override;
47 void EnableEncryptEverything() override;
48 void SetEncryptionPassphrase(const std::string& passphrase,
49 PassphraseType type) override;
50 bool SetDecryptionPassphrase(const std::string& passphrase) override;
51
52 // sync_driver::DataTypeEncryptionHandler:
53 bool IsPassphraseRequired() const override;
54 syncer::ModelTypeSet GetEncryptedDataTypes() const override;
55
56 GoogleServiceAuthError error_;
57 };
58
59 } // namespace sync_driver
60
61 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698