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 18 matching lines...) Expand all Loading... |
29 delay.reset(BackoffDelayProvider::WithShortInitialRetryOverride()); | 29 delay.reset(BackoffDelayProvider::WithShortInitialRetryOverride()); |
30 | 30 |
31 return scoped_ptr<SyncScheduler>( | 31 return scoped_ptr<SyncScheduler>( |
32 new SyncSchedulerImpl(name, delay.release(), context, new Syncer())); | 32 new SyncSchedulerImpl(name, delay.release(), context, new Syncer())); |
33 } | 33 } |
34 | 34 |
35 scoped_ptr<sessions::SyncSessionContext> | 35 scoped_ptr<sessions::SyncSessionContext> |
36 InternalComponentsFactoryImpl::BuildContext( | 36 InternalComponentsFactoryImpl::BuildContext( |
37 ServerConnectionManager* connection_manager, | 37 ServerConnectionManager* connection_manager, |
38 syncable::Directory* directory, | 38 syncable::Directory* directory, |
39 const std::vector<ModelSafeWorker*> workers, | 39 const std::vector<ModelSafeWorker*>& workers, |
40 ExtensionsActivityMonitor* monitor, | 40 ExtensionsActivityMonitor* monitor, |
41 ThrottledDataTypeTracker* throttled_data_type_tracker, | 41 ThrottledDataTypeTracker* throttled_data_type_tracker, |
42 const std::vector<SyncEngineEventListener*>& listeners, | 42 const std::vector<SyncEngineEventListener*>& listeners, |
43 sessions::DebugInfoGetter* debug_info_getter, | 43 sessions::DebugInfoGetter* debug_info_getter, |
44 TrafficRecorder* traffic_recorder, | 44 TrafficRecorder* traffic_recorder, |
45 const std::string& invalidation_client_id) { | 45 const std::string& invalidation_client_id) { |
46 return scoped_ptr<sessions::SyncSessionContext>( | 46 return scoped_ptr<sessions::SyncSessionContext>( |
47 new sessions::SyncSessionContext( | 47 new sessions::SyncSessionContext( |
48 connection_manager, directory, workers, monitor, | 48 connection_manager, directory, workers, monitor, |
49 throttled_data_type_tracker, listeners, debug_info_getter, | 49 throttled_data_type_tracker, listeners, debug_info_getter, |
50 traffic_recorder, | 50 traffic_recorder, |
51 switches_.encryption_method == ENCRYPTION_KEYSTORE, | 51 switches_.encryption_method == ENCRYPTION_KEYSTORE, |
52 invalidation_client_id)); | 52 invalidation_client_id)); |
53 } | 53 } |
54 | 54 |
55 scoped_ptr<syncable::DirectoryBackingStore> | 55 scoped_ptr<syncable::DirectoryBackingStore> |
56 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( | 56 InternalComponentsFactoryImpl::BuildDirectoryBackingStore( |
57 const std::string& dir_name, const base::FilePath& backing_filepath) { | 57 const std::string& dir_name, const base::FilePath& backing_filepath) { |
58 return scoped_ptr<syncable::DirectoryBackingStore>( | 58 return scoped_ptr<syncable::DirectoryBackingStore>( |
59 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); | 59 new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath)); |
60 } | 60 } |
61 | 61 |
62 InternalComponentsFactory::Switches | 62 InternalComponentsFactory::Switches |
63 InternalComponentsFactoryImpl::GetSwitches() const { | 63 InternalComponentsFactoryImpl::GetSwitches() const { |
64 return switches_; | 64 return switches_; |
65 } | 65 } |
66 | 66 |
67 } // namespace syncer | 67 } // namespace syncer |
OLD | NEW |