| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "components/sync/engine/test_engine_components_factory.h" | 5 #include "components/sync/engine/test_engine_components_factory.h" |
| 6 | 6 |
| 7 #include "components/sync/engine_impl/cycle/sync_cycle_context.h" | 7 #include "components/sync/engine_impl/cycle/sync_cycle_context.h" |
| 8 #include "components/sync/syncable/in_memory_directory_backing_store.h" | 8 #include "components/sync/syncable/in_memory_directory_backing_store.h" |
| 9 #include "components/sync/syncable/invalid_directory_backing_store.h" | 9 #include "components/sync/syncable/invalid_directory_backing_store.h" |
| 10 #include "components/sync/syncable/on_disk_directory_backing_store.h" | 10 #include "components/sync/syncable/on_disk_directory_backing_store.h" |
| 11 #include "components/sync/test/engine/fake_sync_scheduler.h" | 11 #include "components/sync/test/engine/fake_sync_scheduler.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 | 14 |
| 15 TestEngineComponentsFactory::TestEngineComponentsFactory( | 15 TestEngineComponentsFactory::TestEngineComponentsFactory( |
| 16 const Switches& switches, | 16 const Switches& switches, |
| 17 StorageOption option, | 17 StorageOption option, |
| 18 StorageOption* storage_used) | 18 StorageOption* storage_used) |
| 19 : switches_(switches), | 19 : switches_(switches), |
| 20 storage_override_(option), | 20 storage_override_(option), |
| 21 storage_used_(storage_used) {} | 21 storage_used_(storage_used) {} |
| 22 | 22 |
| 23 TestEngineComponentsFactory::~TestEngineComponentsFactory() {} | 23 TestEngineComponentsFactory::~TestEngineComponentsFactory() {} |
| 24 | 24 |
| 25 std::unique_ptr<SyncScheduler> TestEngineComponentsFactory::BuildScheduler( | 25 std::unique_ptr<SyncScheduler> TestEngineComponentsFactory::BuildScheduler( |
| 26 const std::string& name, | 26 const std::string& name, |
| 27 SyncCycleContext* context, | 27 SyncCycleContext* context, |
| 28 CancelationSignal* cancelation_signal) { | 28 CancelationSignal* cancelation_signal, |
| 29 bool ignore_auth_credentials) { |
| 29 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); | 30 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); |
| 30 } | 31 } |
| 31 | 32 |
| 32 std::unique_ptr<SyncCycleContext> TestEngineComponentsFactory::BuildContext( | 33 std::unique_ptr<SyncCycleContext> TestEngineComponentsFactory::BuildContext( |
| 33 ServerConnectionManager* connection_manager, | 34 ServerConnectionManager* connection_manager, |
| 34 syncable::Directory* directory, | 35 syncable::Directory* directory, |
| 35 ExtensionsActivity* monitor, | 36 ExtensionsActivity* monitor, |
| 36 const std::vector<SyncEngineEventListener*>& listeners, | 37 const std::vector<SyncEngineEventListener*>& listeners, |
| 37 DebugInfoGetter* debug_info_getter, | 38 DebugInfoGetter* debug_info_getter, |
| 38 ModelTypeRegistry* model_type_registry, | 39 ModelTypeRegistry* model_type_registry, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 NOTREACHED(); | 72 NOTREACHED(); |
| 72 return std::unique_ptr<syncable::DirectoryBackingStore>(); | 73 return std::unique_ptr<syncable::DirectoryBackingStore>(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 EngineComponentsFactory::Switches TestEngineComponentsFactory::GetSwitches() | 76 EngineComponentsFactory::Switches TestEngineComponentsFactory::GetSwitches() |
| 76 const { | 77 const { |
| 77 return switches_; | 78 return switches_; |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace syncer | 81 } // namespace syncer |
| OLD | NEW |