Stop populating SystemProfileProto's ext renderer launch count field.
Stability.Counts2 has this info.
Bug: b/217949916
Change-Id: I41db52fa4ffb028c0aaa03116dd85d37cfeab462
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557592
Reviewed-by: Robert Kaplow <[email protected]>
Auto-Submit: Caitlin Fischer <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/main@{#987235}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 772044d..433ea0d 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -737,6 +737,8 @@
const char kStabilityLaunchCount[] =
"user_experience_metrics.stability.launch_count";
#endif
+const char kStabilityExtensionRendererLaunchCount[] =
+ "user_experience_metrics.stability.extension_renderer_launch_count";
// Register local state used only for migration (clearing or moving to a new
// key).
@@ -774,6 +776,7 @@
#if !BUILDFLAG(IS_ANDROID)
registry->RegisterIntegerPref(kStabilityLaunchCount, 0);
#endif
+ registry->RegisterIntegerPref(kStabilityExtensionRendererLaunchCount, 0);
}
// Register prefs used only for migration (clearing or moving to a new key).
@@ -1616,6 +1619,7 @@
#if !BUILDFLAG(IS_ANDROID)
local_state->ClearPref(kStabilityLaunchCount);
#endif
+ local_state->ClearPref(kStabilityExtensionRendererLaunchCount);
// Please don't delete the following line. It is used by PRESUBMIT.py.
// END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
diff --git a/components/metrics/metrics_pref_names.cc b/components/metrics/metrics_pref_names.cc
index fea0c74..63c904f 100644
--- a/components/metrics/metrics_pref_names.cc
+++ b/components/metrics/metrics_pref_names.cc
@@ -132,11 +132,6 @@
const char kStabilityExtensionRendererFailedLaunchCount[] =
"user_experience_metrics.stability.extension_renderer_failed_launch_count";
-// Number of times an extension renderer process successfully launched since the
-// last report.
-const char kStabilityExtensionRendererLaunchCount[] =
- "user_experience_metrics.stability.extension_renderer_launch_count";
-
// The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
// isn't enabled since the previous stability recorded, this is different than
// the previous browser run, because one file was just uploaded before the
diff --git a/components/metrics/metrics_pref_names.h b/components/metrics/metrics_pref_names.h
index be9489e..274fd3b 100644
--- a/components/metrics/metrics_pref_names.h
+++ b/components/metrics/metrics_pref_names.h
@@ -48,7 +48,6 @@
extern const char kStabilityExitedCleanly[];
extern const char kStabilityExtensionRendererCrashCount[];
extern const char kStabilityExtensionRendererFailedLaunchCount[];
-extern const char kStabilityExtensionRendererLaunchCount[];
extern const char kStabilityFileMetricsUnsentSamplesCount[];
extern const char kStabilityFileMetricsUnsentFilesCount[];
extern const char kStabilityGmsCoreVersion[];
diff --git a/components/metrics/stability_metrics_helper.cc b/components/metrics/stability_metrics_helper.cc
index 7faf5ec..5f208a7 100644
--- a/components/metrics/stability_metrics_helper.cc
+++ b/components/metrics/stability_metrics_helper.cc
@@ -124,13 +124,6 @@
local_state_->SetInteger(
prefs::kStabilityExtensionRendererFailedLaunchCount, 0);
}
-
- count =
- local_state_->GetInteger(prefs::kStabilityExtensionRendererLaunchCount);
- if (count) {
- stability_proto->set_extension_renderer_launch_count(count);
- local_state_->SetInteger(prefs::kStabilityExtensionRendererLaunchCount, 0);
- }
}
void StabilityMetricsHelper::ClearSavedStabilityMetrics() {
@@ -138,7 +131,6 @@
local_state_->SetInteger(prefs::kStabilityExtensionRendererCrashCount, 0);
local_state_->SetInteger(prefs::kStabilityExtensionRendererFailedLaunchCount,
0);
- local_state_->SetInteger(prefs::kStabilityExtensionRendererLaunchCount, 0);
local_state_->SetInteger(prefs::kStabilityGpuCrashCount, 0);
local_state_->SetInteger(prefs::kStabilityPageLoadCount, 0);
local_state_->SetInteger(prefs::kStabilityRendererCrashCount, 0);
@@ -152,8 +144,6 @@
0);
registry->RegisterIntegerPref(
prefs::kStabilityExtensionRendererFailedLaunchCount, 0);
- registry->RegisterIntegerPref(prefs::kStabilityExtensionRendererLaunchCount,
- 0);
registry->RegisterIntegerPref(prefs::kStabilityGpuCrashCount, 0);
registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
registry->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
@@ -293,11 +283,9 @@
auto metric = was_extension_process
? StabilityEventType::kExtensionRendererLaunch
: StabilityEventType::kRendererLaunch;
- auto* pref = was_extension_process
- ? prefs::kStabilityExtensionRendererLaunchCount
- : prefs::kStabilityRendererLaunchCount;
RecordStabilityEvent(metric);
- IncrementPrefValue(pref);
+ if (!was_extension_process)
+ IncrementPrefValue(prefs::kStabilityRendererLaunchCount);
}
void StabilityMetricsHelper::LogRendererLaunchFailed(