| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sync/internal_api/public/internal_components_factory_impl.h" |
| 6 |
| 7 #include "sync/engine/syncer.h" |
| 8 #include "sync/engine/sync_scheduler_impl.h" |
| 9 #include "sync/sessions/sync_session_context.h" |
| 10 #include "sync/syncable/on_disk_directory_backing_store.h" |
| 11 |
| 12 namespace syncer { |
| 13 |
| 14 InternalComponentsFactoryImpl::InternalComponentsFactoryImpl() { } |
| 15 InternalComponentsFactoryImpl::~InternalComponentsFactoryImpl() { } |
| 16 |
| 17 scoped_ptr<SyncScheduler> InternalComponentsFactoryImpl::BuildScheduler( |
| 18 const std::string& name, sessions::SyncSessionContext* context) { |
| 19 return scoped_ptr<SyncScheduler>( |
| 20 new SyncSchedulerImpl(name, context, new Syncer())); |
| 21 } |
| 22 |
| 23 scoped_ptr<sessions::SyncSessionContext> |
| 24 InternalComponentsFactoryImpl::BuildContext( |
| 25 ServerConnectionManager* connection_manager, |
| 26 syncable::Directory* directory, |
| 27 const ModelSafeRoutingInfo& routing_info, |
| 28 const std::vector<ModelSafeWorker*> workers, |
| 29 ExtensionsActivityMonitor* monitor, |
| 30 ThrottledDataTypeTracker* throttled_data_type_tracker, |
| 31 const std::vector<SyncEngineEventListener*>& listeners, |
| 32 sessions::DebugInfoGetter* debug_info_getter, |
| 33 syncer::TrafficRecorder* traffic_recorder) { |
| 34 return scoped_ptr<sessions::SyncSessionContext>( |
| 35 new sessions::SyncSessionContext(connection_manager, directory, |
| 36 routing_info, workers, monitor, throttled_data_type_tracker, |
| 37 listeners, debug_info_getter, traffic_recorder)); |
| 38 } |
| 39 |
| 40 scoped_ptr<syncable::DirectoryBackingStore> |
| 41 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( |
| 42 const std::string& dir_name, const FilePath& backing_filepath) { |
| 43 return scoped_ptr<syncable::DirectoryBackingStore>( |
| 44 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); |
| 45 } |
| 46 |
| 47 } // namespace syncer |
| OLD | NEW |