| 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 26 matching lines...) Expand all Loading... |
| 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 ExtensionsActivity* extensions_activity, | 44 ExtensionsActivity* extensions_activity, |
| 45 const std::vector<SyncEngineEventListener*>& listeners, | 45 const std::vector<SyncEngineEventListener*>& listeners, |
| 46 sessions::DebugInfoGetter* debug_info_getter, | 46 sessions::DebugInfoGetter* debug_info_getter, |
| 47 TrafficRecorder* traffic_recorder, | |
| 48 ModelTypeRegistry* model_type_registry, | 47 ModelTypeRegistry* model_type_registry, |
| 49 const std::string& invalidation_client_id) { | 48 const std::string& invalidation_client_id) { |
| 50 return scoped_ptr<sessions::SyncSessionContext>( | 49 return scoped_ptr<sessions::SyncSessionContext>( |
| 51 new sessions::SyncSessionContext( | 50 new sessions::SyncSessionContext( |
| 52 connection_manager, directory, extensions_activity, | 51 connection_manager, directory, extensions_activity, |
| 53 listeners, debug_info_getter, | 52 listeners, debug_info_getter, |
| 54 traffic_recorder, | |
| 55 model_type_registry, | 53 model_type_registry, |
| 56 switches_.encryption_method == ENCRYPTION_KEYSTORE, | 54 switches_.encryption_method == ENCRYPTION_KEYSTORE, |
| 57 switches_.pre_commit_updates_policy == | 55 switches_.pre_commit_updates_policy == |
| 58 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, | 56 FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE, |
| 59 invalidation_client_id)); | 57 invalidation_client_id)); |
| 60 } | 58 } |
| 61 | 59 |
| 62 scoped_ptr<syncable::DirectoryBackingStore> | 60 scoped_ptr<syncable::DirectoryBackingStore> |
| 63 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( | 61 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( |
| 64 const std::string& dir_name, const base::FilePath& backing_filepath) { | 62 const std::string& dir_name, const base::FilePath& backing_filepath) { |
| 65 return scoped_ptr<syncable::DirectoryBackingStore>( | 63 return scoped_ptr<syncable::DirectoryBackingStore>( |
| 66 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); | 64 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); |
| 67 } | 65 } |
| 68 | 66 |
| 69 InternalComponentsFactory::Switches | 67 InternalComponentsFactory::Switches |
| 70 InternalComponentsFactoryImpl::GetSwitches() const { | 68 InternalComponentsFactoryImpl::GetSwitches() const { |
| 71 return switches_; | 69 return switches_; |
| 72 } | 70 } |
| 73 | 71 |
| 74 } // namespace syncer | 72 } // namespace syncer |
| OLD | NEW |