diff options
author | Tianjie Xu <xunchang@google.com> | 2017-10-10 17:39:03 -0700 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2017-10-14 22:44:35 +0000 |
commit | 90aaa109e38f147ec4bfc772439d9949f1b237c0 (patch) | |
tree | 1a12f29bdb847a384dfacd3cce214bb3891d0ab8 /payload_state.h | |
parent | 012aa5bc825f3efe810cc52864840ace6eae8275 (diff) |
Collect metrics for android update attempt
Report the update attempt/result metrics when an upate finishes;
and abnormally terminated updates/time to reboot when the device
reboots.
Bug: 30989466
Test: update_engine_unittest pass
Change-Id: Iea16b4e8003ae3dab5e9b7c65cf4b38d2219d203
Diffstat (limited to 'payload_state.h')
-rw-r--r-- | payload_state.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/payload_state.h b/payload_state.h index 98f21e85..24e99001 100644 --- a/payload_state.h +++ b/payload_state.h @@ -17,6 +17,7 @@ #ifndef UPDATE_ENGINE_PAYLOAD_STATE_H_ #define UPDATE_ENGINE_PAYLOAD_STATE_H_ +#include <algorithm> #include <string> #include <vector> @@ -240,10 +241,6 @@ class PayloadState : public PayloadStateInterface { // reset on a new update. void ResetDownloadSourcesOnNewUpdate(); - // Returns the persisted value from prefs_ for the given key. It also - // validates that the value returned is non-negative. - int64_t GetPersistedValue(const std::string& key); - // Calculates the response "signature", which is basically a string composed // of the subset of the fields in the current response that affect the // behavior of the PayloadState. @@ -404,16 +401,7 @@ class PayloadState : public PayloadStateInterface { // increments num_reboots. void UpdateNumReboots(); - // Writes the current wall-clock time to the kPrefsSystemUpdatedMarker - // state variable. - void CreateSystemUpdatedMarkerFile(); - // Called at program startup if the device booted into a new update. - // The |time_to_reboot| parameter contains the (wall-clock) duration - // from when the update successfully completed (the value written - // into the kPrefsSystemUpdatedMarker state variable) until the device - // was booted into the update (current wall-clock time). - void BootedIntoUpdate(base::TimeDelta time_to_reboot); // Loads the |kPrefsP2PFirstAttemptTimestamp| state variable from disk // into |p2p_first_attempt_timestamp_|. |