| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/sync/engine/engine_components_factory.h" | 13 #include "components/sync/engine/engine_components_factory.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 | 16 |
| 17 // An EngineComponentsFactory implementation designed for real production / | 17 // An EngineComponentsFactory implementation designed for real production / |
| 18 // normal use. | 18 // normal use. |
| 19 class EngineComponentsFactoryImpl : public EngineComponentsFactory { | 19 class EngineComponentsFactoryImpl : public EngineComponentsFactory { |
| 20 public: | 20 public: |
| 21 explicit EngineComponentsFactoryImpl(const Switches& switches); | 21 explicit EngineComponentsFactoryImpl(const Switches& switches); |
| 22 ~EngineComponentsFactoryImpl() override; | 22 ~EngineComponentsFactoryImpl() override; |
| 23 | 23 |
| 24 std::unique_ptr<SyncScheduler> BuildScheduler( | 24 std::unique_ptr<SyncScheduler> BuildScheduler( |
| 25 const std::string& name, | 25 const std::string& name, |
| 26 SyncCycleContext* context, | 26 SyncCycleContext* context, |
| 27 CancelationSignal* cancelation_signal) override; | 27 CancelationSignal* cancelation_signal, |
| 28 bool ignore_auth_credentials) override; |
| 28 | 29 |
| 29 std::unique_ptr<SyncCycleContext> BuildContext( | 30 std::unique_ptr<SyncCycleContext> BuildContext( |
| 30 ServerConnectionManager* connection_manager, | 31 ServerConnectionManager* connection_manager, |
| 31 syncable::Directory* directory, | 32 syncable::Directory* directory, |
| 32 ExtensionsActivity* extensions_activity, | 33 ExtensionsActivity* extensions_activity, |
| 33 const std::vector<SyncEngineEventListener*>& listeners, | 34 const std::vector<SyncEngineEventListener*>& listeners, |
| 34 DebugInfoGetter* debug_info_getter, | 35 DebugInfoGetter* debug_info_getter, |
| 35 ModelTypeRegistry* model_type_registry, | 36 ModelTypeRegistry* model_type_registry, |
| 36 const std::string& invalidator_client_id) override; | 37 const std::string& invalidator_client_id) override; |
| 37 | 38 |
| 38 std::unique_ptr<syncable::DirectoryBackingStore> BuildDirectoryBackingStore( | 39 std::unique_ptr<syncable::DirectoryBackingStore> BuildDirectoryBackingStore( |
| 39 StorageOption storage, | 40 StorageOption storage, |
| 40 const std::string& dir_name, | 41 const std::string& dir_name, |
| 41 const base::FilePath& backing_filepath) override; | 42 const base::FilePath& backing_filepath) override; |
| 42 | 43 |
| 43 Switches GetSwitches() const override; | 44 Switches GetSwitches() const override; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 const Switches switches_; | 47 const Switches switches_; |
| 47 DISALLOW_COPY_AND_ASSIGN(EngineComponentsFactoryImpl); | 48 DISALLOW_COPY_AND_ASSIGN(EngineComponentsFactoryImpl); |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 } // namespace syncer | 51 } // namespace syncer |
| 51 | 52 |
| 52 #endif // COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ | 53 #endif // COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_ |
| OLD | NEW |