| 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/internal_components_factory_impl.h" | 5 #include "sync/internal_api/public/internal_components_factory_impl.h" |
| 6 | 6 |
| 7 #include "sync/engine/backoff_delay_provider.h" | 7 #include "sync/engine/backoff_delay_provider.h" |
| 8 #include "sync/engine/syncer.h" | 8 #include "sync/engine/syncer.h" |
| 9 #include "sync/engine/sync_scheduler_impl.h" | 9 #include "sync/engine/sync_scheduler_impl.h" |
| 10 #include "sync/sessions/sync_session_context.h" | 10 #include "sync/sessions/sync_session_context.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 name, | 34 name, |
| 35 delay.release(), | 35 delay.release(), |
| 36 context, | 36 context, |
| 37 new Syncer(cancelation_signal))); | 37 new Syncer(cancelation_signal))); |
| 38 } | 38 } |
| 39 | 39 |
| 40 scoped_ptr<sessions::SyncSessionContext> | 40 scoped_ptr<sessions::SyncSessionContext> |
| 41 InternalComponentsFactoryImpl::BuildContext( | 41 InternalComponentsFactoryImpl::BuildContext( |
| 42 ServerConnectionManager* connection_manager, | 42 ServerConnectionManager* connection_manager, |
| 43 syncable::Directory* directory, | 43 syncable::Directory* directory, |
| 44 const std::vector<ModelSafeWorker*>& workers, | |
| 45 ExtensionsActivity* extensions_activity, | 44 ExtensionsActivity* extensions_activity, |
| 46 const std::vector<SyncEngineEventListener*>& listeners, | 45 const std::vector<SyncEngineEventListener*>& listeners, |
| 47 sessions::DebugInfoGetter* debug_info_getter, | 46 sessions::DebugInfoGetter* debug_info_getter, |
| 48 TrafficRecorder* traffic_recorder, | 47 TrafficRecorder* traffic_recorder, |
| 48 ModelTypeRegistry* model_type_registry, |
| 49 const std::string& invalidation_client_id) { | 49 const std::string& invalidation_client_id) { |
| 50 return scoped_ptr<sessions::SyncSessionContext>( | 50 return scoped_ptr<sessions::SyncSessionContext>( |
| 51 new sessions::SyncSessionContext( | 51 new sessions::SyncSessionContext( |
| 52 connection_manager, directory, workers, extensions_activity, | 52 connection_manager, directory, extensions_activity, |
| 53 listeners, debug_info_getter, | 53 listeners, debug_info_getter, |
| 54 traffic_recorder, | 54 traffic_recorder, |
| 55 model_type_registry, |
| 55 switches_.encryption_method == ENCRYPTION_KEYSTORE, | 56 switches_.encryption_method == ENCRYPTION_KEYSTORE, |
| 56 switches_.pre_commit_updates_policy == | 57 switches_.pre_commit_updates_policy == |
| 57 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, | 58 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, |
| 58 invalidation_client_id)); | 59 invalidation_client_id)); |
| 59 } | 60 } |
| 60 | 61 |
| 61 scoped_ptr<syncable::DirectoryBackingStore> | 62 scoped_ptr<syncable::DirectoryBackingStore> |
| 62 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( | 63 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( |
| 63 const std::string& dir_name, const base::FilePath& backing_filepath) { | 64 const std::string& dir_name, const base::FilePath& backing_filepath) { |
| 64 return scoped_ptr<syncable::DirectoryBackingStore>( | 65 return scoped_ptr<syncable::DirectoryBackingStore>( |
| 65 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); | 66 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); |
| 66 } | 67 } |
| 67 | 68 |
| 68 InternalComponentsFactory::Switches | 69 InternalComponentsFactory::Switches |
| 69 InternalComponentsFactoryImpl::GetSwitches() const { | 70 InternalComponentsFactoryImpl::GetSwitches() const { |
| 70 return switches_; | 71 return switches_; |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace syncer | 74 } // namespace syncer |
| OLD | NEW |