Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / sync / internal_api / public / test / test_internal_components_factory.h
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   explicit TestInternalComponentsFactory(const Switches& switches,
15                                          StorageOption option,
16                                          StorageOption* storage_used);
17   ~TestInternalComponentsFactory() override;
18
19   scoped_ptr<SyncScheduler> BuildScheduler(
20       const std::string& name,
21       sessions::SyncSessionContext* context,
22       syncer::CancelationSignal* cancelation_signal) override;
23
24   scoped_ptr<sessions::SyncSessionContext> BuildContext(
25       ServerConnectionManager* connection_manager,
26       syncable::Directory* directory,
27       ExtensionsActivity* monitor,
28       const std::vector<SyncEngineEventListener*>& listeners,
29       sessions::DebugInfoGetter* debug_info_getter,
30       ModelTypeRegistry* model_type_registry,
31       const std::string& invalidator_client_id) override;
32
33   scoped_ptr<syncable::DirectoryBackingStore> BuildDirectoryBackingStore(
34       StorageOption storage,
35       const std::string& dir_name,
36       const base::FilePath& backing_filepath) override;
37
38   Switches GetSwitches() const override;
39
40  private:
41   const Switches switches_;
42   const StorageOption storage_override_;
43   StorageOption* storage_used_;
44
45   DISALLOW_COPY_AND_ASSIGN(TestInternalComponentsFactory);
46 };
47
48 }  // namespace syncer
49
50 #endif  // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_INTERNAL_COMPONENTS_FACTORY_H_