| 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 "sync/internal_api/public/test/test_internal_components_factory.h" |
| 6 | 6 |
| 7 #include "sync/sessions/sync_session_context.h" | 7 #include "sync/sessions/sync_session_context.h" |
| 8 #include "sync/syncable/in_memory_directory_backing_store.h" | 8 #include "sync/syncable/in_memory_directory_backing_store.h" |
| 9 #include "sync/syncable/on_disk_directory_backing_store.h" | 9 #include "sync/syncable/on_disk_directory_backing_store.h" |
| 10 #include "sync/syncable/invalid_directory_backing_store.h" | 10 #include "sync/syncable/invalid_directory_backing_store.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 return scoped_ptr<SyncScheduler>(new FakeSyncScheduler()); | 28 return scoped_ptr<SyncScheduler>(new FakeSyncScheduler()); |
| 29 } | 29 } |
| 30 | 30 |
| 31 scoped_ptr<sessions::SyncSessionContext> | 31 scoped_ptr<sessions::SyncSessionContext> |
| 32 TestInternalComponentsFactory::BuildContext( | 32 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 sessions::DebugInfoGetter* debug_info_getter, | 37 sessions::DebugInfoGetter* debug_info_getter, |
| 38 TrafficRecorder* traffic_recorder, | |
| 39 ModelTypeRegistry* model_type_registry, | 38 ModelTypeRegistry* model_type_registry, |
| 40 const std::string& invalidator_client_id) { | 39 const std::string& invalidator_client_id) { |
| 41 | 40 |
| 42 // Tests don't wire up listeners. | 41 // Tests don't wire up listeners. |
| 43 std::vector<SyncEngineEventListener*> empty_listeners; | 42 std::vector<SyncEngineEventListener*> empty_listeners; |
| 44 return scoped_ptr<sessions::SyncSessionContext>( | 43 return scoped_ptr<sessions::SyncSessionContext>( |
| 45 new sessions::SyncSessionContext( | 44 new sessions::SyncSessionContext( |
| 46 connection_manager, directory, monitor, | 45 connection_manager, directory, monitor, |
| 47 empty_listeners, debug_info_getter, | 46 empty_listeners, debug_info_getter, |
| 48 traffic_recorder, | |
| 49 model_type_registry, | 47 model_type_registry, |
| 50 switches_.encryption_method == ENCRYPTION_KEYSTORE, | 48 switches_.encryption_method == ENCRYPTION_KEYSTORE, |
| 51 switches_.pre_commit_updates_policy == | 49 switches_.pre_commit_updates_policy == |
| 52 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, | 50 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, |
| 53 invalidator_client_id)); | 51 invalidator_client_id)); |
| 54 | 52 |
| 55 } | 53 } |
| 56 | 54 |
| 57 scoped_ptr<syncable::DirectoryBackingStore> | 55 scoped_ptr<syncable::DirectoryBackingStore> |
| 58 TestInternalComponentsFactory::BuildDirectoryBackingStore( | 56 TestInternalComponentsFactory::BuildDirectoryBackingStore( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 72 NOTREACHED(); | 70 NOTREACHED(); |
| 73 return scoped_ptr<syncable::DirectoryBackingStore>(); | 71 return scoped_ptr<syncable::DirectoryBackingStore>(); |
| 74 } | 72 } |
| 75 | 73 |
| 76 InternalComponentsFactory::Switches | 74 InternalComponentsFactory::Switches |
| 77 TestInternalComponentsFactory::GetSwitches() const { | 75 TestInternalComponentsFactory::GetSwitches() const { |
| 78 return switches_; | 76 return switches_; |
| 79 } | 77 } |
| 80 | 78 |
| 81 } // namespace syncer | 79 } // namespace syncer |
| OLD | NEW |