| 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_CLIENT_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ | 6 #define COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "components/sync_driver/sync_client.h" | 11 #include "components/sync_driver/sync_client.h" |
| 10 | 12 |
| 11 namespace sync_driver { | 13 namespace sync_driver { |
| 12 class FakeSyncService; | 14 class FakeSyncService; |
| 13 | 15 |
| 14 // Fake implementation of SyncClient interface for tests. | 16 // Fake implementation of SyncClient interface for tests. |
| 15 class FakeSyncClient : public SyncClient { | 17 class FakeSyncClient : public SyncClient { |
| 16 public: | 18 public: |
| 17 FakeSyncClient(); | 19 FakeSyncClient(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 37 syncer::ModelType type) override; | 39 syncer::ModelType type) override; |
| 38 syncer_v2::ModelTypeService* GetModelTypeServiceForType( | 40 syncer_v2::ModelTypeService* GetModelTypeServiceForType( |
| 39 syncer::ModelType type) override; | 41 syncer::ModelType type) override; |
| 40 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( | 42 scoped_refptr<syncer::ModelSafeWorker> CreateModelWorkerForGroup( |
| 41 syncer::ModelSafeGroup group, | 43 syncer::ModelSafeGroup group, |
| 42 syncer::WorkerLoopDestructionObserver* observer) override; | 44 syncer::WorkerLoopDestructionObserver* observer) override; |
| 43 SyncApiComponentFactory* GetSyncApiComponentFactory() override; | 45 SyncApiComponentFactory* GetSyncApiComponentFactory() override; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 SyncApiComponentFactory* factory_; | 48 SyncApiComponentFactory* factory_; |
| 47 scoped_ptr<FakeSyncService> sync_service_; | 49 std::unique_ptr<FakeSyncService> sync_service_; |
| 48 | 50 |
| 49 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); | 51 DISALLOW_COPY_AND_ASSIGN(FakeSyncClient); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace sync_driver | 54 } // namespace sync_driver |
| 53 | 55 |
| 54 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ | 56 #endif // COMPONENTS_SYNC_DRIVER_FAKE_SYNC_CLIENT_H_ |
| OLD | NEW |