Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: sync/internal_api/internal_components_factory_impl.cc

Issue 10701046: sync: Remove SyncManager::TestingMode in favour of InternalComponentsFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove SetSchedulerForTest Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 SyncScheduler* InternalComponentsFactoryImpl::BuildScheduler(
18 const std::string& name, sessions::SyncSessionContext* context) {
19 return new SyncSchedulerImpl(name, context, new Syncer());
20 }
21
22 sessions::SyncSessionContext* InternalComponentsFactoryImpl::BuildContext(
23 ServerConnectionManager* connection_manager,
24 syncable::Directory* directory,
25 const ModelSafeRoutingInfo& routing_info,
26 const std::vector<ModelSafeWorker*> workers,
27 ExtensionsActivityMonitor* monitor,
28 ThrottledDataTypeTracker* throttled_data_type_tracker,
29 const std::vector<SyncEngineEventListener*>& listeners,
30 sessions::DebugInfoGetter* debug_info_getter,
31 syncer::TrafficRecorder* traffic_recorder) {
32 return new sessions::SyncSessionContext(connection_manager, directory,
33 routing_info, workers, monitor, throttled_data_type_tracker, listeners,
34 debug_info_getter, traffic_recorder);
35 }
36
37 syncable::DirectoryBackingStore*
38 InternalComponentsFactoryImpl::BuildDirectoryBackingStore(
39 const std::string& dir_name, const FilePath& backing_filepath) {
40 return new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath);
41 }
42
43 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698