Reland "Deprecated shutdown metrics V1"
This is a reland of commit 6a5b8a2bf336fa05dd1fdba5086f6f011ff44e86
OBSOLETE_HISTOGRAMS="Shutdown Metrics V1 are replaced by Shutdown Metrics V2"
Original change's description:
> Deprecated shutdown metrics V1
>
> The V1 set of metrics were using the local state prefs to keep
> the shutdown metrics until the next startup where they will be
> reported.
>
> A recent change in Chrome fixed the persistent memory for metrics.
> This means that UMA metrics macros are now working during shutdown.
>
> The V2 metrics are landed for months and are stable. We can deprecate
> the V1 set of metrics.
>
> Deprecate UMA metrics:
> * Shutdown.NotValid.Time
> * Shutdown.SilentExit.Time
> * Shutdown.WindowClose.Time
> * Shutdown.BrowserExit.Time
> * Shutdown.EndSession.Time
> * Shutdown.OtherExit.Time
>
> Deprecate the shutdown time file:
> * chrome_shutdown_ms.txt
>
> Deprecate local state prefs:
> * shutdown.num_processes
> * shutdown.num_processes_slow"
>
> OBSOLETE_HISTOGRAMS="Shutdown Metrics V1 are replaced by Shutdown Metrics V2"
>
> Bug: 1456205, 1468093
> Change-Id: I1a48b5b3e0b5791ef53152448c8cd096471d6308
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4734233
> Reviewed-by: Scott Violet <[email protected]>
> Reviewed-by: Luc Nguyen <[email protected]>
> Commit-Queue: Etienne Bergeron <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1178085}
Bug: 1456205, 1468093
Change-Id: I9cf3ced4d3620c6719e269c193750e2393aae1f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4742700
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: Etienne Bergeron <[email protected]>
Reviewed-by: Luc Nguyen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1178528}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 56a625fe..54f774c 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -952,6 +952,10 @@
const char kClearUserDataDir1Pref[] = "lacros.clear_user_data_dir_1";
#endif
+// Deprecated 07/2023.
+const char kShutdownNumProcesses[] = "shutdown.num_processes";
+const char kShutdownNumProcessesSlow[] = "shutdown.num_processes_slow";
+
// Register local state used only for migration (clearing or moving to a new
// key).
void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
@@ -1082,6 +1086,10 @@
#if !BUILDFLAG(IS_ANDROID)
registry->RegisterBooleanPref(kLegacyHoverCardImagesEnabled, false);
#endif // !BUILDFLAG(IS_ANDROID)
+
+ // Deprecated 07/2023.
+ registry->RegisterIntegerPref(kShutdownNumProcesses, 0);
+ registry->RegisterIntegerPref(kShutdownNumProcessesSlow, 0);
}
// Register prefs used only for migration (clearing or moving to a new key).
@@ -2192,6 +2200,10 @@
local_state->ClearPref(kLegacyHoverCardImagesEnabled);
#endif
+ // Added 07/2023.
+ local_state->ClearPref(kShutdownNumProcesses);
+ local_state->ClearPref(kShutdownNumProcessesSlow);
+
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS