blob: 8747a597003f0c19f76bf1305b069ba50a8e711b [file] [log] [blame]
Jay Srinivasan55f50c22013-01-10 19:24:35 -08001// Copyright (c) 2012 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
Gilad Arnold5bb4c902014-04-10 12:32:13 -07005#include "update_engine/fake_system_state.h"
Alex Deymo560ae1d2014-10-28 02:17:54 -07006
Jay Srinivasan55f50c22013-01-10 19:24:35 -08007namespace chromeos_update_engine {
8
9// Mock the SystemStateInterface so that we could lie that
10// OOBE is completed even when there's no such marker file, etc.
Gilad Arnold5bb4c902014-04-10 12:32:13 -070011FakeSystemState::FakeSystemState()
Gilad Arnold1f847232014-04-07 12:07:49 -070012 : mock_connection_manager_(this),
13 mock_update_attempter_(this, &dbus_),
Alex Deymo560ae1d2014-10-28 02:17:54 -070014 mock_request_params_(this),
Alex Deymo63784a52014-05-28 10:46:14 -070015 fake_update_manager_(&fake_clock_),
Gilad Arnold1f847232014-04-07 12:07:49 -070016 clock_(&fake_clock_),
17 connection_manager_(&mock_connection_manager_),
18 hardware_(&fake_hardware_),
19 metrics_lib_(&mock_metrics_lib_),
Chris Sosaaa18e162013-06-20 13:20:30 -070020 prefs_(&mock_prefs_),
David Zeuthen526cb582013-08-06 12:26:18 -070021 powerwash_safe_prefs_(&mock_powerwash_safe_prefs_),
Alex Deymo94c06162014-03-21 20:34:46 -070022 payload_state_(&mock_payload_state_),
Gilad Arnold1f847232014-04-07 12:07:49 -070023 update_attempter_(&mock_update_attempter_),
Alex Deymo560ae1d2014-10-28 02:17:54 -070024 request_params_(&mock_request_params_),
Gilad Arnold1f847232014-04-07 12:07:49 -070025 p2p_manager_(&mock_p2p_manager_),
Alex Deymo63784a52014-05-28 10:46:14 -070026 update_manager_(&fake_update_manager_),
Gilad Arnold1f847232014-04-07 12:07:49 -070027 device_policy_(nullptr),
28 fake_system_rebooted_(false) {
Jay Srinivasan19409b72013-04-12 19:23:36 -070029 mock_payload_state_.Initialize(this);
Gilad Arnold1f847232014-04-07 12:07:49 -070030 mock_update_attempter_.Init();
Jay Srinivasan55f50c22013-01-10 19:24:35 -080031}
32
Alex Deymo94c06162014-03-21 20:34:46 -070033} // namespace chromeos_update_engine