Delete obsolete Android type id logging code.
It was originally added here:
https://codereview.chromium.org/137623002
It was later refactored as part of the metrics provider
interface introduction:
https://codereview.chromium.org/294043008
However, it was never hooked up properly so no data was logged.
Later, since the histograms were never logged, they were
marked as obsolete by this CL:
https://codereview.chromium.org/1934723002
However, checking my local state file, it seems there still
is a need to clean up the prefs, because the list ones are
still there (and empty), so added some code for that.
BUG=758719
Change-Id: Ic098104f902c786403bca14d76a05fae8b96eef5
Reviewed-on: https://chromium-review.googlesource.com/633689
Commit-Queue: Alexei Svitkine (very slow) <[email protected]>
Reviewed-by: Bernhard Bauer <[email protected]>
Reviewed-by: Ilya Sherman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#498204}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 35aa2e2..6e4e5b8 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -313,6 +313,18 @@
// Preferences files added here 2/2017.
constexpr char kDistroDict[] = "distribution";
+#if defined(OS_ANDROID)
+// Deprecated 8/2017.
+const char kStabilityForegroundActivityType[] =
+ "user_experience_metrics.stability.current_foreground_activity_type";
+const char kStabilityLaunchedActivityFlags[] =
+ "user_experience_metrics.stability.launched_activity_flags";
+const char kStabilityLaunchedActivityCounts[] =
+ "user_experience_metrics.stability.launched_activity_counts";
+const char kStabilityCrashedActivityCounts[] =
+ "user_experience_metrics.stability.crashed_activity_counts";
+#endif // defined(OS_ANDROID)
+
} // namespace
namespace chrome {
@@ -361,6 +373,12 @@
#if defined(OS_ANDROID)
::android::RegisterPrefs(registry);
+
+ // Obsolete activity prefs. See MigrateObsoleteBrowserPrefs().
+ registry->RegisterIntegerPref(kStabilityForegroundActivityType, 0);
+ registry->RegisterIntegerPref(kStabilityLaunchedActivityFlags, 0);
+ registry->RegisterListPref(kStabilityLaunchedActivityCounts);
+ registry->RegisterListPref(kStabilityCrashedActivityCounts);
#endif
#if !defined(OS_ANDROID)
@@ -700,6 +718,14 @@
local_state->ClearPref(prefs::kTouchscreenEnabled);
local_state->ClearPref(prefs::kTouchpadEnabled);
#endif // defined(OS_CHROMEOS)
+
+#if defined(OS_ANDROID)
+ // Added 8/2017.
+ local_state->ClearPref(kStabilityForegroundActivityType);
+ local_state->ClearPref(kStabilityLaunchedActivityFlags);
+ local_state->ClearPref(kStabilityLaunchedActivityCounts);
+ local_state->ClearPref(kStabilityCrashedActivityCounts);
+#endif // defined(OS_ANDROID)
}
// This method should be periodically pruned of year+ old migrations.