Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2012 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 16 | |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 17 | #include "update_engine/cros/fake_system_state.h" |
Alex Deymo | 560ae1d | 2014-10-28 02:17:54 -0700 | [diff] [blame] | 18 | |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 19 | namespace chromeos_update_engine { |
| 20 | |
| 21 | // Mock the SystemStateInterface so that we could lie that |
| 22 | // OOBE is completed even when there's no such marker file, etc. |
Gilad Arnold | 5bb4c90 | 2014-04-10 12:32:13 -0700 | [diff] [blame] | 23 | FakeSystemState::FakeSystemState() |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 24 | : mock_update_attempter_(nullptr), |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 25 | clock_(&fake_clock_), |
| 26 | connection_manager_(&mock_connection_manager_), |
| 27 | hardware_(&fake_hardware_), |
Tianjie Xu | 282aa1f | 2017-09-05 13:42:45 -0700 | [diff] [blame] | 28 | metrics_reporter_(&mock_metrics_reporter_), |
Amin Hassani | 90e9f19 | 2020-11-18 14:20:56 -0800 | [diff] [blame] | 29 | prefs_(&fake_prefs_), |
| 30 | powerwash_safe_prefs_(&fake_powerwash_safe_prefs_), |
Alex Deymo | 3053450 | 2015-07-20 15:06:33 -0700 | [diff] [blame] | 31 | payload_state_(&mock_payload_state_), |
| 32 | update_attempter_(&mock_update_attempter_), |
| 33 | request_params_(&mock_request_params_), |
| 34 | p2p_manager_(&mock_p2p_manager_), |
| 35 | update_manager_(&fake_update_manager_), |
| 36 | device_policy_(nullptr), |
| 37 | fake_system_rebooted_(false) { |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 38 | mock_payload_state_.Initialize(); |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 39 | } |
| 40 | |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 41 | } // namespace chromeos_update_engine |