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

Unified Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 2666653002: Record field-trial information in stability file for crash analysis. (Closed)
Patch Set: rebased Created 3 years, 10 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: chrome/browser/chrome_browser_field_trials_desktop.cc
diff --git a/chrome/browser/chrome_browser_field_trials_desktop.cc b/chrome/browser/chrome_browser_field_trials_desktop.cc
index a8c81507e2ea79070d69d10d6271cc7e0c6a1e66..98be88cb5a15ff7f36c09acbeabbd4686e29bb2b 100644
--- a/chrome/browser/chrome_browser_field_trials_desktop.cc
+++ b/chrome/browser/chrome_browser_field_trials_desktop.cc
@@ -112,6 +112,7 @@ void RecordChromeModuleInfo(
void SetupStabilityDebugging() {
if (!base::FeatureList::IsEnabled(
browser_watcher::kStabilityDebuggingFeature)) {
+ base::debug::GlobalActivityTracker::DisableFieldTrialRecording();
return;
}
@@ -161,7 +162,7 @@ void SetupStabilityDebugging() {
&version_number, &special_build,
&channel_name);
- base::debug::ActivityUserData& global_data = global_tracker->user_data();
+ base::debug::ActivityUserData& global_data = global_tracker->global_data();
global_data.SetString(browser_watcher::kStabilityProduct, product_name);
global_data.SetString(browser_watcher::kStabilityVersion, version_number);
global_data.SetString(browser_watcher::kStabilityChannel, channel_name);
@@ -187,6 +188,11 @@ void SetupDesktopFieldTrials() {
#if defined(OS_WIN)
SetupStabilityDebugging();
base::FeatureList::IsEnabled(features::kModuleDatabase);
+#else
+ // This needs to be called when no GlobalActivityTracker is created so
+ // that the "temporary" copies of field-trial activations don't get held
+ // indefinitely.
+ base::debug::GlobalActivityTracker::DisableFieldTrialRecording();
#endif // defined(OS_WIN)
// Activate the experiment as early as possible to increase its visibility
// (e.g. the likelihood of its presence in the serialized system profile).

Powered by Google App Engine
This is Rietveld 408576698