Commit bd9616f8 authored by Eugene But's avatar Eugene But Committed by Chromium LUCI CQ

Fix MobileSessionAppWillTerminateWasReceived metric in xml

MobileSessionAppWillTerminateWasReceived is how metric actually recorded.
XML had MobileSessionAppWillTerminateReceived ("was" word was missing) and
MobileSessionAppWillTerminateReceived was never recorded.

This CL also renames MobileSessionAppWillTerminateReceived to
MobileSessionAppWillTerminateWasReceived.

Bug: None
Change-Id: I0c1104f9776c696722fd9477097b0630cf13d2a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617136Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarWeilun Shi <sweilun@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842236}
parent 9ad9a869
...@@ -61,10 +61,10 @@ enum class MobileSessionOomShutdownHint { ...@@ -61,10 +61,10 @@ enum class MobileSessionOomShutdownHint {
kMaxValue = SessionRestorationXte kMaxValue = SessionRestorationXte
}; };
// Values of the Stability.iOS.UTE.MobileSessionAppWillTerminateReceived // Values of the Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived
// histogram. These values are persisted to logs. Entries should not be // histogram. These values are persisted to logs. Entries should not be
// renumbered and numeric values should never be reused. // renumbered and numeric values should never be reused.
enum class MobileSessionAppWillTerminateReceived { enum class MobileSessionAppWillTerminateWasReceived {
// ApplicationWillTerminate notification was not received for this XTE. // ApplicationWillTerminate notification was not received for this XTE.
WasNotReceivedForXte = 0, WasNotReceivedForXte = 0,
// ApplicationWillTerminate notification was not received for this UTE. // ApplicationWillTerminate notification was not received for this UTE.
...@@ -143,18 +143,18 @@ MobileSessionAppState GetMobileSessionAppState(bool has_possible_explanation) { ...@@ -143,18 +143,18 @@ MobileSessionAppState GetMobileSessionAppState(bool has_possible_explanation) {
} }
// Returns value to record for // Returns value to record for
// Stability.iOS.UTE.MobileSessionAppWillTerminateReceived histogram. // Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived histogram.
MobileSessionAppWillTerminateReceived GetMobileSessionAppWillTerminateReceived( MobileSessionAppWillTerminateWasReceived
bool has_possible_explanation) { GetMobileSessionAppWillTerminateWasReceived(bool has_possible_explanation) {
if (!PreviousSessionInfo.sharedInstance.applicationWillTerminateWasReceived) { if (!PreviousSessionInfo.sharedInstance.applicationWillTerminateWasReceived) {
return has_possible_explanation return has_possible_explanation
? MobileSessionAppWillTerminateReceived::WasNotReceivedForXte ? MobileSessionAppWillTerminateWasReceived::WasNotReceivedForXte
: MobileSessionAppWillTerminateReceived::WasNotReceivedForUte; : MobileSessionAppWillTerminateWasReceived::WasNotReceivedForUte;
} }
return has_possible_explanation return has_possible_explanation
? MobileSessionAppWillTerminateReceived::WasReceivedForXte ? MobileSessionAppWillTerminateWasReceived::WasReceivedForXte
: MobileSessionAppWillTerminateReceived::WasReceivedForUte; : MobileSessionAppWillTerminateWasReceived::WasReceivedForUte;
} }
// Logs |type| in the shutdown type histogram. // Logs |type| in the shutdown type histogram.
...@@ -351,8 +351,8 @@ void MobileSessionShutdownMetricsProvider::ProvidePreviousSessionData( ...@@ -351,8 +351,8 @@ void MobileSessionShutdownMetricsProvider::ProvidePreviousSessionData(
UMA_STABILITY_HISTOGRAM_ENUMERATION( UMA_STABILITY_HISTOGRAM_ENUMERATION(
"Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived", "Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived",
GetMobileSessionAppWillTerminateReceived(possible_explanation), GetMobileSessionAppWillTerminateWasReceived(possible_explanation),
MobileSessionAppWillTerminateReceived::kMaxValue); MobileSessionAppWillTerminateWasReceived::kMaxValue);
if (!possible_explanation && EnableSyntheticCrashReportsForUte() && if (!possible_explanation && EnableSyntheticCrashReportsForUte() &&
GetApplicationContext()->GetLocalState()->GetBoolean( GetApplicationContext()->GetLocalState()->GetBoolean(
......
...@@ -436,7 +436,7 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -436,7 +436,7 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary> </summary>
</histogram> </histogram>
<histogram name="Stability.iOS.UTE.MobileSessionAppWillTerminateReceived" <histogram name="Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived"
enum="AppWillTerminateReceived" expires_after="2021-04-29"> enum="AppWillTerminateReceived" expires_after="2021-04-29">
<owner>eugenebut@chromium.org</owner> <owner>eugenebut@chromium.org</owner>
<owner>olivierrobin@chromium.org</owner> <owner>olivierrobin@chromium.org</owner>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment