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 #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 <string> | |
9 #include <vector> | |
10 | |
11 #include "base/macros.h" | |
12 #include "sync/internal_api/public/internal_components_factory.h" | |
13 | |
14 namespace syncer { | |
15 | |
16 class TestInternalComponentsFactory : public InternalComponentsFactory { | |
17 public: | |
18 explicit TestInternalComponentsFactory(const Switches& switches, | |
19 StorageOption option, | |
20 StorageOption* storage_used); | |
21 ~TestInternalComponentsFactory() override; | |
22 | |
23 std::unique_ptr<SyncScheduler> BuildScheduler( | |
24 const std::string& name, | |
25 sessions::SyncSessionContext* context, | |
26 syncer::CancelationSignal* cancelation_signal) override; | |
27 | |
28 std::unique_ptr<sessions::SyncSessionContext> BuildContext( | |
29 ServerConnectionManager* connection_manager, | |
30 syncable::Directory* directory, | |
31 ExtensionsActivity* monitor, | |
32 const std::vector<SyncEngineEventListener*>& listeners, | |
33 sessions::DebugInfoGetter* debug_info_getter, | |
34 ModelTypeRegistry* model_type_registry, | |
35 const std::string& invalidator_client_id) override; | |
36 | |
37 std::unique_ptr<syncable::DirectoryBackingStore> BuildDirectoryBackingStore( | |
38 StorageOption storage, | |
39 const std::string& dir_name, | |
40 const base::FilePath& backing_filepath) override; | |
41 | |
42 Switches GetSwitches() const override; | |
43 | |
44 private: | |
45 const Switches switches_; | |
46 const StorageOption storage_override_; | |
47 StorageOption* storage_used_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory); | |
50 }; | |
51 | |
52 } // namespace syncer | |
53 | |
54 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_ | |
OLD | NEW |