Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm

Issue 1246843002: Change the meaning of MobileSessionShutdownType's FIRST_LAUNCH_AFTER_UPGRADE bucket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep deprecated enum value. Update histograms Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm
diff --git a/ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm b/ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm
index 1f08314a089989da52487b948fbe30ca5934eaec..0d52c1bc79eba2a0873203583ed190ab9b766009 100644
--- a/ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm
+++ b/ios/chrome/browser/metrics/ios_stability_metrics_provider_unittest.mm
@@ -100,8 +100,8 @@ TEST_P(IOSStabilityMetricsProviderTest, ProvideStabilityMetrics) {
const bool received_memory_warning = GetParam() % 2;
const bool has_crash_logs = (GetParam() >> 1) % 2;
const bool has_uploaded_crash_reports_in_background = (GetParam() >> 2) % 2;
- const bool was_last_shutdown_clean = (GetParam() >> 3) % 2;
- const bool is_first_launch_after_upgrade = (GetParam() >> 4) % 2;
+ const bool is_first_launch_after_upgrade = (GetParam() >> 3) % 2;
+ const bool was_last_shutdown_clean = (GetParam() >> 4) % 2;
// Expected bucket for each possible value of GetParam().
const MobileSessionShutdownType expected_buckets[] = {
@@ -113,8 +113,26 @@ TEST_P(IOSStabilityMetricsProviderTest, ProvideStabilityMetrics) {
SHUTDOWN_IN_FOREGROUND_WITH_CRASH_LOG_WITH_MEMORY_WARNING,
SHUTDOWN_IN_FOREGROUND_WITH_CRASH_LOG_NO_MEMORY_WARNING,
SHUTDOWN_IN_FOREGROUND_WITH_CRASH_LOG_WITH_MEMORY_WARNING,
- // If wasLastShutdownClean is true, the memory warning and crash log don't
- // matter.
+ // If firstLaunchAfterUpgrade is true, it is not possible to determine the
+ // real reason of the crash, so the memory warning and crash log flags
+ // don't matter.
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE,
+ // If wasLastShutdownClean is true, the other flags don't matter.
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
+ SHUTDOWN_IN_BACKGROUND,
SHUTDOWN_IN_BACKGROUND,
SHUTDOWN_IN_BACKGROUND,
SHUTDOWN_IN_BACKGROUND,
@@ -123,23 +141,6 @@ TEST_P(IOSStabilityMetricsProviderTest, ProvideStabilityMetrics) {
SHUTDOWN_IN_BACKGROUND,
SHUTDOWN_IN_BACKGROUND,
SHUTDOWN_IN_BACKGROUND,
- // If firstLaunchAfterUpgrade is true, the other flags don't matter.
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
- FIRST_LAUNCH_AFTER_UPGRADE,
};
// Setup the MetricsService.

Powered by Google App Engine
This is Rietveld 408576698