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/core/test/test_internal_components_factory.h" | 5 #include "components/sync/core/test/test_internal_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 TestInternalComponentsFactory::TestInternalComponentsFactory( | 15 TestInternalComponentsFactory::TestInternalComponentsFactory( |
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 TestInternalComponentsFactory::~TestInternalComponentsFactory() {} | 23 TestInternalComponentsFactory::~TestInternalComponentsFactory() {} |
24 | 24 |
25 std::unique_ptr<SyncScheduler> TestInternalComponentsFactory::BuildScheduler( | 25 std::unique_ptr<SyncScheduler> TestInternalComponentsFactory::BuildScheduler( |
26 const std::string& name, | 26 const std::string& name, |
27 SyncCycleContext* context, | 27 SyncCycleContext* context, |
28 CancelationSignal* cancelation_signal) { | 28 syncer::CancelationSignal* cancelation_signal) { |
29 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); | 29 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); |
30 } | 30 } |
31 | 31 |
32 std::unique_ptr<SyncCycleContext> TestInternalComponentsFactory::BuildContext( | 32 std::unique_ptr<SyncCycleContext> TestInternalComponentsFactory::BuildContext( |
33 ServerConnectionManager* connection_manager, | 33 ServerConnectionManager* connection_manager, |
34 syncable::Directory* directory, | 34 syncable::Directory* directory, |
35 ExtensionsActivity* monitor, | 35 ExtensionsActivity* monitor, |
36 const std::vector<SyncEngineEventListener*>& listeners, | 36 const std::vector<SyncEngineEventListener*>& listeners, |
37 DebugInfoGetter* debug_info_getter, | 37 DebugInfoGetter* debug_info_getter, |
38 ModelTypeRegistry* model_type_registry, | 38 ModelTypeRegistry* model_type_registry, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 NOTREACHED(); | 71 NOTREACHED(); |
72 return std::unique_ptr<syncable::DirectoryBackingStore>(); | 72 return std::unique_ptr<syncable::DirectoryBackingStore>(); |
73 } | 73 } |
74 | 74 |
75 InternalComponentsFactory::Switches TestInternalComponentsFactory::GetSwitches() | 75 InternalComponentsFactory::Switches TestInternalComponentsFactory::GetSwitches() |
76 const { | 76 const { |
77 return switches_; | 77 return switches_; |
78 } | 78 } |
79 | 79 |
80 } // namespace syncer | 80 } // namespace syncer |
OLD | NEW |