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 "sync/internal_api/public/test/test_internal_components_factory.h" | 5 #include "components/sync/core/test/test_internal_components_factory.h" |
6 | 6 |
7 #include "sync/sessions/sync_session_context.h" | 7 #include "components/sync/sessions_impl/sync_session_context.h" |
8 #include "sync/syncable/in_memory_directory_backing_store.h" | 8 #include "components/sync/syncable/in_memory_directory_backing_store.h" |
9 #include "sync/syncable/on_disk_directory_backing_store.h" | 9 #include "components/sync/syncable/invalid_directory_backing_store.h" |
10 #include "sync/syncable/invalid_directory_backing_store.h" | 10 #include "components/sync/syncable/on_disk_directory_backing_store.h" |
11 #include "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 } | |
23 | 22 |
24 TestInternalComponentsFactory::~TestInternalComponentsFactory() { } | 23 TestInternalComponentsFactory::~TestInternalComponentsFactory() {} |
25 | 24 |
26 std::unique_ptr<SyncScheduler> TestInternalComponentsFactory::BuildScheduler( | 25 std::unique_ptr<SyncScheduler> TestInternalComponentsFactory::BuildScheduler( |
27 const std::string& name, | 26 const std::string& name, |
28 sessions::SyncSessionContext* context, | 27 sessions::SyncSessionContext* context, |
29 syncer::CancelationSignal* cancelation_signal) { | 28 syncer::CancelationSignal* cancelation_signal) { |
30 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); | 29 return std::unique_ptr<SyncScheduler>(new FakeSyncScheduler()); |
31 } | 30 } |
32 | 31 |
33 std::unique_ptr<sessions::SyncSessionContext> | 32 std::unique_ptr<sessions::SyncSessionContext> |
34 TestInternalComponentsFactory::BuildContext( | 33 TestInternalComponentsFactory::BuildContext( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 new syncable::OnDiskDirectoryBackingStore(dir_name, | 67 new syncable::OnDiskDirectoryBackingStore(dir_name, |
69 backing_filepath)); | 68 backing_filepath)); |
70 case STORAGE_INVALID: | 69 case STORAGE_INVALID: |
71 return std::unique_ptr<syncable::DirectoryBackingStore>( | 70 return std::unique_ptr<syncable::DirectoryBackingStore>( |
72 new syncable::InvalidDirectoryBackingStore()); | 71 new syncable::InvalidDirectoryBackingStore()); |
73 } | 72 } |
74 NOTREACHED(); | 73 NOTREACHED(); |
75 return std::unique_ptr<syncable::DirectoryBackingStore>(); | 74 return std::unique_ptr<syncable::DirectoryBackingStore>(); |
76 } | 75 } |
77 | 76 |
78 InternalComponentsFactory::Switches | 77 InternalComponentsFactory::Switches TestInternalComponentsFactory::GetSwitches() |
79 TestInternalComponentsFactory::GetSwitches() const { | 78 const { |
80 return switches_; | 79 return switches_; |
81 } | 80 } |
82 | 81 |
83 } // namespace syncer | 82 } // namespace syncer |
OLD | NEW |