| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 1 | // | 
 | 2 | // Copyright (C) 2016 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 | // | 
 | 16 |  | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 17 | #ifndef UPDATE_ENGINE_AOSP_UPDATE_ATTEMPTER_ANDROID_H_ | 
 | 18 | #define UPDATE_ENGINE_AOSP_UPDATE_ATTEMPTER_ANDROID_H_ | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 19 |  | 
 | 20 | #include <stdint.h> | 
 | 21 |  | 
 | 22 | #include <memory> | 
 | 23 | #include <string> | 
 | 24 | #include <vector> | 
 | 25 |  | 
| Kyeongkab.Nam | 500ca13 | 2019-06-26 13:48:07 +0900 | [diff] [blame] | 26 | #include <android-base/unique_fd.h> | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 27 | #include <base/time/time.h> | 
 | 28 |  | 
| Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 29 | #include "update_engine/aosp/apex_handler_interface.h" | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 30 | #include "update_engine/aosp/service_delegate_android_interface.h" | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 31 | #include "update_engine/client_library/include/update_engine/update_status.h" | 
 | 32 | #include "update_engine/common/action_processor.h" | 
 | 33 | #include "update_engine/common/boot_control_interface.h" | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 34 | #include "update_engine/common/clock.h" | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 35 | #include "update_engine/common/daemon_state_interface.h" | 
 | 36 | #include "update_engine/common/download_action.h" | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 37 | #include "update_engine/common/hardware_interface.h" | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 38 | #include "update_engine/common/metrics_reporter_interface.h" | 
 | 39 | #include "update_engine/common/network_selector_interface.h" | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 40 | #include "update_engine/common/prefs_interface.h" | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 41 | #include "update_engine/common/service_observer_interface.h" | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 42 | #include "update_engine/metrics_utils.h" | 
| Kelvin Zhang | 70eef23 | 2020-06-12 20:32:40 +0000 | [diff] [blame] | 43 | #include "update_engine/payload_consumer/filesystem_verifier_action.h" | 
| Alex Deymo | 0d29854 | 2016-03-30 18:31:49 -0700 | [diff] [blame] | 44 | #include "update_engine/payload_consumer/postinstall_runner_action.h" | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 45 |  | 
 | 46 | namespace chromeos_update_engine { | 
 | 47 |  | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 48 | enum class OTAResult { | 
 | 49 |   NOT_ATTEMPTED, | 
 | 50 |   ROLLED_BACK, | 
 | 51 |   UPDATED_NEED_REBOOT, | 
 | 52 |   OTA_SUCCESSFUL, | 
 | 53 | }; | 
 | 54 |  | 
| Alex Deymo | 0d29854 | 2016-03-30 18:31:49 -0700 | [diff] [blame] | 55 | class UpdateAttempterAndroid | 
 | 56 |     : public ServiceDelegateAndroidInterface, | 
 | 57 |       public ActionProcessorDelegate, | 
 | 58 |       public DownloadActionDelegate, | 
| Kelvin Zhang | 70eef23 | 2020-06-12 20:32:40 +0000 | [diff] [blame] | 59 |       public FilesystemVerifyDelegate, | 
| Yifan Hong | 9096550 | 2020-02-19 15:22:47 -0800 | [diff] [blame] | 60 |       public PostinstallRunnerAction::DelegateInterface, | 
 | 61 |       public CleanupPreviousUpdateActionDelegateInterface { | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 62 |  public: | 
 | 63 |   using UpdateStatus = update_engine::UpdateStatus; | 
 | 64 |  | 
| Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 65 |   UpdateAttempterAndroid(DaemonStateInterface* daemon_state, | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 66 |                          PrefsInterface* prefs, | 
 | 67 |                          BootControlInterface* boot_control_, | 
| Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 68 |                          HardwareInterface* hardware_, | 
 | 69 |                          std::unique_ptr<ApexHandlerInterface> apex_handler); | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 70 |   ~UpdateAttempterAndroid() override; | 
 | 71 |  | 
 | 72 |   // Further initialization to be done post construction. | 
 | 73 |   void Init(); | 
 | 74 |  | 
 | 75 |   // ServiceDelegateAndroidInterface overrides. | 
 | 76 |   bool ApplyPayload(const std::string& payload_url, | 
 | 77 |                     int64_t payload_offset, | 
 | 78 |                     int64_t payload_size, | 
 | 79 |                     const std::vector<std::string>& key_value_pair_headers, | 
 | 80 |                     brillo::ErrorPtr* error) override; | 
| Kyeongkab.Nam | 500ca13 | 2019-06-26 13:48:07 +0900 | [diff] [blame] | 81 |   bool ApplyPayload(int fd, | 
 | 82 |                     int64_t payload_offset, | 
 | 83 |                     int64_t payload_size, | 
 | 84 |                     const std::vector<std::string>& key_value_pair_headers, | 
 | 85 |                     brillo::ErrorPtr* error) override; | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 86 |   bool SuspendUpdate(brillo::ErrorPtr* error) override; | 
 | 87 |   bool ResumeUpdate(brillo::ErrorPtr* error) override; | 
 | 88 |   bool CancelUpdate(brillo::ErrorPtr* error) override; | 
| Alex Deymo | 3b678db | 2016-02-09 11:50:06 -0800 | [diff] [blame] | 89 |   bool ResetStatus(brillo::ErrorPtr* error) override; | 
| Sen Jiang | 28d8ed9 | 2018-02-01 13:46:39 -0800 | [diff] [blame] | 90 |   bool VerifyPayloadApplicable(const std::string& metadata_filename, | 
 | 91 |                                brillo::ErrorPtr* error) override; | 
| Yifan Hong | 6f7e29f | 2019-12-13 14:41:06 -0800 | [diff] [blame] | 92 |   uint64_t AllocateSpaceForPayload( | 
 | 93 |       const std::string& metadata_filename, | 
 | 94 |       const std::vector<std::string>& key_value_pair_headers, | 
 | 95 |       brillo::ErrorPtr* error) override; | 
| Yifan Hong | 40bb0d0 | 2020-02-24 17:33:14 -0800 | [diff] [blame] | 96 |   void CleanupSuccessfulUpdate( | 
 | 97 |       std::unique_ptr<CleanupSuccessfulUpdateCallbackInterface> callback, | 
 | 98 |       brillo::ErrorPtr* error) override; | 
| Tianjie | 7f8f2ab | 2021-07-23 17:08:50 -0700 | [diff] [blame] | 99 |   bool setShouldSwitchSlotOnReboot(const std::string& metadata_filename, | 
 | 100 |                                    brillo::ErrorPtr* error) override; | 
 | 101 |   bool resetShouldSwitchSlotOnReboot(brillo::ErrorPtr* error) override; | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 102 |  | 
 | 103 |   // ActionProcessorDelegate methods: | 
 | 104 |   void ProcessingDone(const ActionProcessor* processor, | 
 | 105 |                       ErrorCode code) override; | 
 | 106 |   void ProcessingStopped(const ActionProcessor* processor) override; | 
 | 107 |   void ActionCompleted(ActionProcessor* processor, | 
 | 108 |                        AbstractAction* action, | 
 | 109 |                        ErrorCode code) override; | 
 | 110 |  | 
 | 111 |   // DownloadActionDelegate overrides. | 
 | 112 |   void BytesReceived(uint64_t bytes_progressed, | 
 | 113 |                      uint64_t bytes_received, | 
 | 114 |                      uint64_t total) override; | 
 | 115 |   bool ShouldCancel(ErrorCode* cancel_reason) override; | 
 | 116 |   void DownloadComplete() override; | 
 | 117 |  | 
| Kelvin Zhang | 70eef23 | 2020-06-12 20:32:40 +0000 | [diff] [blame] | 118 |   // FilesystemVerifyDelegate overrides | 
 | 119 |   void OnVerifyProgressUpdate(double progress) override; | 
 | 120 |  | 
| Alex Deymo | 0d29854 | 2016-03-30 18:31:49 -0700 | [diff] [blame] | 121 |   // PostinstallRunnerAction::DelegateInterface | 
 | 122 |   void ProgressUpdate(double progress) override; | 
 | 123 |  | 
| Yifan Hong | 9096550 | 2020-02-19 15:22:47 -0800 | [diff] [blame] | 124 |   // CleanupPreviousUpdateActionDelegateInterface | 
 | 125 |   void OnCleanupProgressUpdate(double progress) override; | 
 | 126 |  | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 127 |   // Check the result of an OTA update. Intended to be called after reboot, this | 
 | 128 |   // will use prefs on disk to determine if OTA was installed, or rolledback. | 
 | 129 |   [[nodiscard]] OTAResult GetOTAUpdateResult() const; | 
 | 130 |   // Intended to be called: | 
 | 131 |   // 1. When system rebooted and slot switch is attempted | 
 | 132 |   // 2. When a new update is started | 
 | 133 |   // 3. When user called |ResetStatus()| | 
 | 134 |   bool ClearUpdateCompletedMarker(); | 
 | 135 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 136 |  private: | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 137 |   friend class UpdateAttempterAndroidTest; | 
 | 138 |  | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 139 |   // Return |true| only if slot switched successfully after an OTA reboot. | 
 | 140 |   // This will return |false| if an downgrade OTA is applied. Because after a | 
 | 141 |   // downgrade OTA, we wipe /data, and there's no way for update_engine to | 
 | 142 |   // "remember" that a downgrade OTA took place. | 
 | 143 |   [[nodiscard]] bool OTARebootSucceeded() const; | 
 | 144 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 145 |   // Schedules an event loop callback to start the action processor. This is | 
 | 146 |   // scheduled asynchronously to unblock the event loop. | 
 | 147 |   void ScheduleProcessingStart(); | 
 | 148 |  | 
 | 149 |   // Notifies an update request completed with the given error |code| to all | 
 | 150 |   // observers. | 
 | 151 |   void TerminateUpdateAndNotify(ErrorCode error_code); | 
 | 152 |  | 
 | 153 |   // Sets the status to the given |status| and notifies a status update to | 
 | 154 |   // all observers. | 
 | 155 |   void SetStatusAndNotify(UpdateStatus status); | 
 | 156 |  | 
 | 157 |   // Helper method to construct the sequence of actions to be performed for | 
| Amin Hassani | 667cf7b | 2018-07-25 14:32:00 -0700 | [diff] [blame] | 158 |   // applying an update using a given HttpFetcher. The ownership of |fetcher| is | 
 | 159 |   // passed to this function. | 
 | 160 |   void BuildUpdateActions(HttpFetcher* fetcher); | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 161 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 162 |   // Writes to the processing completed marker. Does nothing if | 
 | 163 |   // |update_completed_marker_| is empty. | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 164 |   [[nodiscard]] bool WriteUpdateCompletedMarker(); | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 165 |  | 
 | 166 |   // Returns whether an update was completed in the current boot. | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 167 |   [[nodiscard]] bool UpdateCompletedOnThisBoot(); | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 168 |  | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 169 |   // Prefs to use for metrics report | 
 | 170 |   // |kPrefsPayloadAttemptNumber|: number of update attempts for the current | 
 | 171 |   // payload_id. | 
 | 172 |   // |KprefsNumReboots|: number of reboots when applying the current update. | 
 | 173 |   // |kPrefsSystemUpdatedMarker|: end timestamp of the last successful update. | 
| Tianjie Xu | 2a0ea63 | 2018-08-06 12:59:23 -0700 | [diff] [blame] | 174 |   // |kPrefsUpdateTimestampStart|: start timestamp in monotonic time of the | 
 | 175 |   // current update. | 
 | 176 |   // |kPrefsUpdateBootTimestampStart|: start timestamp in boot time of | 
 | 177 |   // the current update. | 
| Tianjie Xu | d4777a1 | 2017-10-24 14:54:18 -0700 | [diff] [blame] | 178 |   // |kPrefsCurrentBytesDownloaded|: number of bytes downloaded for the current | 
 | 179 |   // payload_id. | 
 | 180 |   // |kPrefsTotalBytesDownloaded|: number of bytes downloaded in total since | 
 | 181 |   // the last successful update. | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 182 |  | 
 | 183 |   // Metrics report function to call: | 
 | 184 |   //   |ReportUpdateAttemptMetrics| | 
 | 185 |   //   |ReportSuccessfulUpdateMetrics| | 
 | 186 |   // Prefs to update: | 
 | 187 |   //   |kPrefsSystemUpdatedMarker| | 
 | 188 |   void CollectAndReportUpdateMetricsOnUpdateFinished(ErrorCode error_code); | 
 | 189 |  | 
| Kelvin Zhang | 4061c51 | 2021-05-25 13:42:55 -0400 | [diff] [blame] | 190 |   // This function is called after update_engine is started after device | 
 | 191 |   // reboots. If update_engine is restarted w/o device reboot, this function | 
 | 192 |   // would not be called. | 
 | 193 |  | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 194 |   // Metrics report function to call: | 
 | 195 |   //   |ReportAbnormallyTerminatedUpdateAttemptMetrics| | 
 | 196 |   //   |ReportTimeToRebootMetrics| | 
 | 197 |   // Prefs to update: | 
 | 198 |   //   |kPrefsBootId|, |kPrefsPreviousVersion| | 
| Kelvin Zhang | a43d6e8 | 2021-05-26 10:14:42 -0400 | [diff] [blame] | 199 |   void UpdateStateAfterReboot(OTAResult result); | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 200 |  | 
 | 201 |   // Prefs to update: | 
| Tianjie Xu | 2a0ea63 | 2018-08-06 12:59:23 -0700 | [diff] [blame] | 202 |   //   |kPrefsPayloadAttemptNumber|, |kPrefsUpdateTimestampStart|, | 
 | 203 |   //   |kPrefsUpdateBootTimestampStart| | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 204 |   void UpdatePrefsOnUpdateStart(bool is_resume); | 
 | 205 |  | 
 | 206 |   // Prefs to delete: | 
| xunchang | 9cf5262 | 2019-01-25 11:04:58 -0800 | [diff] [blame] | 207 |   //   |kPrefsNumReboots|, |kPrefsCurrentBytesDownloaded| | 
| Tianjie Xu | d4777a1 | 2017-10-24 14:54:18 -0700 | [diff] [blame] | 208 |   //   |kPrefsSystemUpdatedMarker|, |kPrefsUpdateTimestampStart|, | 
| xunchang | 9cf5262 | 2019-01-25 11:04:58 -0800 | [diff] [blame] | 209 |   //   |kPrefsUpdateBootTimestampStart| | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 210 |   void ClearMetricsPrefs(); | 
 | 211 |  | 
| Yifan Hong | bd47d62 | 2019-12-13 14:59:58 -0800 | [diff] [blame] | 212 |   // Return source and target slots for update. | 
 | 213 |   BootControlInterface::Slot GetCurrentSlot() const; | 
 | 214 |   BootControlInterface::Slot GetTargetSlot() const; | 
 | 215 |  | 
 | 216 |   // Helper of public VerifyPayloadApplicable. Return the parsed manifest in | 
 | 217 |   // |manifest|. | 
 | 218 |   static bool VerifyPayloadParseManifest(const std::string& metadata_filename, | 
 | 219 |                                          DeltaArchiveManifest* manifest, | 
 | 220 |                                          brillo::ErrorPtr* error); | 
 | 221 |  | 
| Yifan Hong | 9096550 | 2020-02-19 15:22:47 -0800 | [diff] [blame] | 222 |   // Enqueue and run a CleanupPreviousUpdateAction. | 
 | 223 |   void ScheduleCleanupPreviousUpdate(); | 
 | 224 |  | 
| Yifan Hong | 40bb0d0 | 2020-02-24 17:33:14 -0800 | [diff] [blame] | 225 |   // Notify and clear |cleanup_previous_update_callbacks_|. | 
 | 226 |   void NotifyCleanupPreviousUpdateCallbacksAndClear(); | 
 | 227 |  | 
 | 228 |   // Remove |callback| from |cleanup_previous_update_callbacks_|. | 
 | 229 |   void RemoveCleanupPreviousUpdateCallback( | 
 | 230 |       CleanupSuccessfulUpdateCallbackInterface* callback); | 
 | 231 |  | 
| Alex Deymo | 03a4de7 | 2016-07-20 16:08:23 -0700 | [diff] [blame] | 232 |   DaemonStateInterface* daemon_state_; | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 233 |  | 
 | 234 |   // DaemonStateAndroid pointers. | 
 | 235 |   PrefsInterface* prefs_; | 
 | 236 |   BootControlInterface* boot_control_; | 
 | 237 |   HardwareInterface* hardware_; | 
 | 238 |  | 
| Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 239 |   std::unique_ptr<ApexHandlerInterface> apex_handler_android_; | 
 | 240 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 241 |   // Last status notification timestamp used for throttling. Use monotonic | 
 | 242 |   // TimeTicks to ensure that notifications are sent even if the system clock is | 
 | 243 |   // set back in the middle of an update. | 
 | 244 |   base::TimeTicks last_notify_time_; | 
 | 245 |  | 
| Amin Hassani | 04d4162 | 2018-12-20 15:35:41 -0800 | [diff] [blame] | 246 |   // Only direct proxy supported. | 
 | 247 |   DirectProxyResolver proxy_resolver_; | 
 | 248 |  | 
| Amin Hassani | 667cf7b | 2018-07-25 14:32:00 -0700 | [diff] [blame] | 249 |   // The processor for running Actions. | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 250 |   std::unique_ptr<ActionProcessor> processor_; | 
 | 251 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 252 |   // The InstallPlan used during the ongoing update. | 
 | 253 |   InstallPlan install_plan_; | 
 | 254 |  | 
 | 255 |   // For status: | 
 | 256 |   UpdateStatus status_{UpdateStatus::IDLE}; | 
 | 257 |   double download_progress_{0.0}; | 
 | 258 |  | 
| Alex Deymo | 0fd51ff | 2016-02-03 14:22:43 -0800 | [diff] [blame] | 259 |   // The offset in the payload file where the CrAU part starts. | 
 | 260 |   int64_t base_offset_{0}; | 
 | 261 |  | 
| Alex Deymo | 87792ea | 2016-07-25 15:40:36 -0700 | [diff] [blame] | 262 |   // Helper class to select the network to use during the update. | 
 | 263 |   std::unique_ptr<NetworkSelectorInterface> network_selector_; | 
 | 264 |  | 
| Tianjie Xu | 90aaa10 | 2017-10-10 17:39:03 -0700 | [diff] [blame] | 265 |   std::unique_ptr<ClockInterface> clock_; | 
 | 266 |  | 
| Tianjie Xu | 1b66114 | 2017-09-28 14:03:42 -0700 | [diff] [blame] | 267 |   std::unique_ptr<MetricsReporterInterface> metrics_reporter_; | 
 | 268 |  | 
| Kyeongkab.Nam | 500ca13 | 2019-06-26 13:48:07 +0900 | [diff] [blame] | 269 |   ::android::base::unique_fd payload_fd_; | 
 | 270 |  | 
| Yifan Hong | 40bb0d0 | 2020-02-24 17:33:14 -0800 | [diff] [blame] | 271 |   std::vector<std::unique_ptr<CleanupSuccessfulUpdateCallbackInterface>> | 
 | 272 |       cleanup_previous_update_callbacks_; | 
 | 273 |   // Result of previous CleanupPreviousUpdateAction. Nullopt If | 
 | 274 |   // CleanupPreviousUpdateAction has not been executed. | 
 | 275 |   std::optional<ErrorCode> cleanup_previous_update_code_{std::nullopt}; | 
 | 276 |  | 
| Alex Deymo | 5e3ea27 | 2016-01-28 13:42:23 -0800 | [diff] [blame] | 277 |   DISALLOW_COPY_AND_ASSIGN(UpdateAttempterAndroid); | 
 | 278 | }; | 
 | 279 |  | 
 | 280 | }  // namespace chromeos_update_engine | 
 | 281 |  | 
| Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 282 | #endif  // UPDATE_ENGINE_AOSP_UPDATE_ATTEMPTER_ANDROID_H_ |