| OLD | NEW |
| 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_SERVICE_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class FakeSyncService : public SyncService { | 21 class FakeSyncService : public SyncService { |
| 22 public: | 22 public: |
| 23 FakeSyncService(); | 23 FakeSyncService(); |
| 24 ~FakeSyncService() override; | 24 ~FakeSyncService() override; |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // SyncService: | 27 // SyncService: |
| 28 bool IsFirstSetupComplete() const override; | 28 bool IsFirstSetupComplete() const override; |
| 29 bool IsSyncAllowed() const override; | 29 bool IsSyncAllowed() const override; |
| 30 bool IsSyncActive() const override; | 30 bool IsSyncActive() const override; |
| 31 bool IsLocalSyncEnabled() const override; |
| 31 void TriggerRefresh(const ModelTypeSet& types) override; | 32 void TriggerRefresh(const ModelTypeSet& types) override; |
| 32 ModelTypeSet GetActiveDataTypes() const override; | 33 ModelTypeSet GetActiveDataTypes() const override; |
| 33 SyncClient* GetSyncClient() const override; | 34 SyncClient* GetSyncClient() const override; |
| 34 void AddObserver(SyncServiceObserver* observer) override; | 35 void AddObserver(SyncServiceObserver* observer) override; |
| 35 void RemoveObserver(SyncServiceObserver* observer) override; | 36 void RemoveObserver(SyncServiceObserver* observer) override; |
| 36 bool HasObserver(const SyncServiceObserver* observer) const override; | 37 bool HasObserver(const SyncServiceObserver* observer) const override; |
| 37 void OnDataTypeRequestsSyncStartup(ModelType type) override; | 38 void OnDataTypeRequestsSyncStartup(ModelType type) override; |
| 38 bool CanSyncStart() const override; | 39 bool CanSyncStart() const override; |
| 39 void RequestStop(SyncService::SyncStopDataFate data_fate) override; | 40 void RequestStop(SyncService::SyncStopDataFate data_fate) override; |
| 40 void RequestStart() override; | 41 void RequestStart() override; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 90 |
| 90 GoogleServiceAuthError error_; | 91 GoogleServiceAuthError error_; |
| 91 GURL sync_service_url_; | 92 GURL sync_service_url_; |
| 92 std::string unrecoverable_error_message_; | 93 std::string unrecoverable_error_message_; |
| 93 std::unique_ptr<UserShare> user_share_; | 94 std::unique_ptr<UserShare> user_share_; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace syncer | 97 } // namespace syncer |
| 97 | 98 |
| 98 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_ | 99 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_SERVICE_H_ |
| OLD | NEW |