engine_components_factory_impl.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_
  5. #define COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_
  6. #include <memory>
  7. #include <string>
  8. #include <vector>
  9. #include "components/sync/engine/engine_components_factory.h"
  10. namespace syncer {
  11. // An EngineComponentsFactory implementation designed for real production /
  12. // normal use.
  13. class EngineComponentsFactoryImpl : public EngineComponentsFactory {
  14. public:
  15. explicit EngineComponentsFactoryImpl(const Switches& switches);
  16. EngineComponentsFactoryImpl(const EngineComponentsFactoryImpl&) = delete;
  17. EngineComponentsFactoryImpl& operator=(const EngineComponentsFactoryImpl&) =
  18. delete;
  19. ~EngineComponentsFactoryImpl() override = default;
  20. std::unique_ptr<SyncScheduler> BuildScheduler(
  21. const std::string& name,
  22. SyncCycleContext* context,
  23. CancelationSignal* cancelation_signal,
  24. bool ignore_auth_credentials) override;
  25. std::unique_ptr<SyncCycleContext> BuildContext(
  26. ServerConnectionManager* connection_manager,
  27. ExtensionsActivity* extensions_activity,
  28. const std::vector<SyncEngineEventListener*>& listeners,
  29. DebugInfoGetter* debug_info_getter,
  30. ModelTypeRegistry* model_type_registry,
  31. const std::string& invalidator_client_id,
  32. const std::string& cache_guid,
  33. const std::string& store_birthday,
  34. const std::string& bag_of_chips,
  35. base::TimeDelta poll_interval) override;
  36. private:
  37. const Switches switches_;
  38. };
  39. } // namespace syncer
  40. #endif // COMPONENTS_SYNC_ENGINE_ENGINE_COMPONENTS_FACTORY_IMPL_H_