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

Side by Side Diff: sync/internal_api/public/test/test_internal_components_factory.h

Issue 10701046: sync: Remove SyncManager::TestingMode in favour of InternalComponentsFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now with more scope 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 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_
6 #define SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_
7
8 #include "sync/internal_api/public/internal_components_factory.h"
9
10 namespace syncer {
11
12 class TestInternalComponentsFactory : public InternalComponentsFactory {
13 public:
14 enum StorageOption {
15 // BuildDirectoryBackingStore should not use persistent on-disk storage.
16 IN_MEMORY,
17 // Use this if you want BuildDirectoryBackingStore to create a real
18 // on disk store.
19 ON_DISK
20 };
21
22 explicit TestInternalComponentsFactory(StorageOption option);
23 virtual ~TestInternalComponentsFactory();
24
25 virtual scoped_ptr<SyncScheduler> BuildScheduler(
26 const std::string& name,
27 sessions::SyncSessionContext* context) OVERRIDE;
28
29 virtual scoped_ptr<sessions::SyncSessionContext> BuildContext(
30 ServerConnectionManager* connection_manager,
31 syncable::Directory* directory,
32 const ModelSafeRoutingInfo& routing_info,
33 const std::vector<ModelSafeWorker*> workers,
34 ExtensionsActivityMonitor* monitor,
35 ThrottledDataTypeTracker* throttled_data_type_tracker,
36 const std::vector<SyncEngineEventListener*>& listeners,
37 sessions::DebugInfoGetter* debug_info_getter,
38 syncer::TrafficRecorder* traffic_recorder) OVERRIDE;
39
40 virtual scoped_ptr<syncable::DirectoryBackingStore>
41 BuildDirectoryBackingStore(
42 const std::string& dir_name,
43 const FilePath& backing_filepath) OVERRIDE;
44
45 private:
46 const StorageOption storage_option_;
47
48 DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory);
49 };
50
51 } // namespace syncer
52
53 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698