blob: 6f1bd02577e53a74fa98e0a58b65265242c0098f [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()
Alex Deymo30534502015-07-20 15:06:33 -070012 : mock_update_attempter_(this, nullptr, nullptr),
13 mock_request_params_(this),
14 fake_update_manager_(&fake_clock_),
15 clock_(&fake_clock_),
16 connection_manager_(&mock_connection_manager_),
17 hardware_(&fake_hardware_),
18 metrics_lib_(&mock_metrics_lib_),
19 prefs_(&mock_prefs_),
20 powerwash_safe_prefs_(&mock_powerwash_safe_prefs_),
21 payload_state_(&mock_payload_state_),
22 update_attempter_(&mock_update_attempter_),
23 request_params_(&mock_request_params_),
24 p2p_manager_(&mock_p2p_manager_),
25 update_manager_(&fake_update_manager_),
26 device_policy_(nullptr),
27 fake_system_rebooted_(false) {
Jay Srinivasan19409b72013-04-12 19:23:36 -070028 mock_payload_state_.Initialize(this);
Gilad Arnold1f847232014-04-07 12:07:49 -070029 mock_update_attempter_.Init();
Jay Srinivasan55f50c22013-01-10 19:24:35 -080030}
31
Alex Deymo94c06162014-03-21 20:34:46 -070032} // namespace chromeos_update_engine