Deprecate the PluginMetricsProvider and stability plugin metrics.

Plugins are mostly deprecated. Stability plugin metrics have outlived
their usefulness and can be removed.

Bug: 1296397, b/216817659

Change-Id: I6d07dc9b5816e0e2f90dc8b5616daf7b0c5eac90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3498784
Reviewed-by: Ilya Sherman <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Auto-Submit: Caitlin Fischer <[email protected]>
Reviewed-by: Tommy Li <[email protected]>
Commit-Queue: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/main@{#976836}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 819c39e..901a9ff 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -716,8 +716,6 @@
     "data_reduction.last_enabled_time";
 
 // Deprecated 02/2022.
-const char kStabilityChildProcessCrashCount[] =
-    "user_experience_metrics.stability.child_process_crash_count";
 #if !BUILDFLAG(IS_ANDROID)
 const char kMediaRouterCloudServicesPrefSet[] =
     "media_router.cloudservices.prefset";
@@ -733,6 +731,14 @@
     "multidevice_setup.phone_hub_camera_roll_pending_state";
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
 
+// Deprecated 03/2022.
+const char kStabilityChildProcessCrashCount[] =
+    "user_experience_metrics.stability.child_process_crash_count";
+#if BUILDFLAG(ENABLE_PLUGINS)
+const char kStabilityPluginStats[] =
+    "user_experience_metrics.stability.plugin_stats2";
+#endif
+
 // Register local state used only for migration (clearing or moving to a new
 // key).
 void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -763,8 +769,13 @@
   registry->RegisterBooleanPref(kStabilitySessionEndCompleted, true);
 
   // Deprecated 02/2022.
-  registry->RegisterIntegerPref(kStabilityChildProcessCrashCount, 0);
   registry->RegisterBooleanPref(kWebSQLInThirdPartyContextEnabled, false);
+
+  // Deprecated 03/2002.
+  registry->RegisterIntegerPref(kStabilityChildProcessCrashCount, 0);
+#if BUILDFLAG(ENABLE_PLUGINS)
+  registry->RegisterListPref(kStabilityPluginStats);
+#endif
 }
 
 // Register prefs used only for migration (clearing or moving to a new key).
@@ -1596,6 +1607,12 @@
   // Added 02/2022.
   local_state->ClearPref(kWebSQLInThirdPartyContextEnabled);
 
+  // Added 03/2002.
+  local_state->ClearPref(kStabilityChildProcessCrashCount);
+#if BUILDFLAG(ENABLE_PLUGINS)
+  local_state->ClearPref(kStabilityPluginStats);
+#endif
+
   // Please don't delete the following line. It is used by PRESUBMIT.py.
   // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS