Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 1 | // Copyright (c) 2014 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_FACTORY_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_FACTORY_H_ |
| 7 | |
| 8 | #include "update_engine/clock_interface.h" |
| 9 | #include "update_engine/dbus_wrapper_interface.h" |
| 10 | #include "update_engine/policy_manager/state.h" |
| 11 | |
| 12 | namespace chromeos_policy_manager { |
| 13 | |
| 14 | // Creates and initializes a new State instance using the real providers |
| 15 | // instantiated using the passed interfaces when needed. The State doesn't |
| 16 | // take ownership of the passed interfaces, which need to remain available |
| 17 | // during the life of this instance. |
| 18 | // If one of the underlying providers fails to initialize, this function returns |
| 19 | // NULL. |
| 20 | State* DefaultStateFactory( |
| 21 | chromeos_update_engine::DBusWrapperInterface* dbus, |
| 22 | chromeos_update_engine::ClockInterface* clock); |
| 23 | |
| 24 | } // namespace chromeos_policy_manager |
| 25 | |
| 26 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_STATE_FACTORY_H_ |