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

Side by Side Diff: sync/internal_api/public/internal_components_factory_impl.h

Issue 10837231: sync: add InternalComponentsFactory::Switches to simplify passing switches to internal components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pass switches in test_profile_sync_service.cc Created 8 years, 4 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
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 // An InternalComponentsFactory implementation designed for real production / 5 // An InternalComponentsFactory implementation designed for real production /
6 // normal use. 6 // normal use.
7 7
8 #ifndef SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_ 8 #ifndef SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_
9 #define SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_ 9 #define SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_
10 10
11 #include "sync/internal_api/public/internal_components_factory.h" 11 #include "sync/internal_api/public/internal_components_factory.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 class InternalComponentsFactoryImpl : public InternalComponentsFactory { 15 class InternalComponentsFactoryImpl : public InternalComponentsFactory {
16 public: 16 public:
17 InternalComponentsFactoryImpl(); 17 InternalComponentsFactoryImpl(const Switches& switches);
18 virtual ~InternalComponentsFactoryImpl(); 18 virtual ~InternalComponentsFactoryImpl();
19 19
20 virtual scoped_ptr<SyncScheduler> BuildScheduler( 20 virtual scoped_ptr<SyncScheduler> BuildScheduler(
21 const std::string& name, 21 const std::string& name,
22 sessions::SyncSessionContext* context) OVERRIDE; 22 sessions::SyncSessionContext* context) OVERRIDE;
23 23
24 virtual scoped_ptr<sessions::SyncSessionContext> BuildContext( 24 virtual scoped_ptr<sessions::SyncSessionContext> BuildContext(
25 ServerConnectionManager* connection_manager, 25 ServerConnectionManager* connection_manager,
26 syncable::Directory* directory, 26 syncable::Directory* directory,
27 const std::vector<ModelSafeWorker*> workers, 27 const std::vector<ModelSafeWorker*> workers,
28 ExtensionsActivityMonitor* monitor, 28 ExtensionsActivityMonitor* monitor,
29 ThrottledDataTypeTracker* throttled_data_type_tracker, 29 ThrottledDataTypeTracker* throttled_data_type_tracker,
30 const std::vector<SyncEngineEventListener*>& listeners, 30 const std::vector<SyncEngineEventListener*>& listeners,
31 sessions::DebugInfoGetter* debug_info_getter, 31 sessions::DebugInfoGetter* debug_info_getter,
32 TrafficRecorder* traffic_recorder, 32 TrafficRecorder* traffic_recorder) OVERRIDE;
33 bool keystore_encryption_enabled) OVERRIDE;
34 33
35 virtual scoped_ptr<syncable::DirectoryBackingStore> 34 virtual scoped_ptr<syncable::DirectoryBackingStore>
36 BuildDirectoryBackingStore( 35 BuildDirectoryBackingStore(
37 const std::string& dir_name, 36 const std::string& dir_name,
38 const FilePath& backing_filepath) OVERRIDE; 37 const FilePath& backing_filepath) OVERRIDE;
39 38
39 virtual Switches GetSwitches() const OVERRIDE;
40
40 private: 41 private:
42 const Switches switches_;
41 DISALLOW_COPY_AND_ASSIGN(InternalComponentsFactoryImpl); 43 DISALLOW_COPY_AND_ASSIGN(InternalComponentsFactoryImpl);
42 }; 44 };
43 45
44 } // namespace syncer 46 } // namespace syncer
45 47
46 #endif // SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_ 48 #endif // SYNC_INTERNAL_API_PUBLIC_INTERNAL_COMPONENTS_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698