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

Unified Diff: chrome/browser/about_flags.cc

Issue 2847823004: [tracing] Allow enabling heap profiling from chrome://flags (Closed)
Patch Set: Created 3 years, 8 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/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 1c1995e59356f722f1863932f8c2b108d08a7902..a226864677f15c8a92e3696a89014c98b9ffbd29 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -927,6 +927,16 @@ const FeatureEntry::FeatureVariation kDataReductionMainMenuFeatureVariations[] =
arraysize(kPersistentMenuItemEnabled), nullptr}};
#endif // OS_ANDROID
+const FeatureEntry::Choice kEnableHeapProfilingChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
+ {flag_descriptions::kEnableHeapProfilingModePseudo,
+ switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo},
+ {flag_descriptions::kEnableHeapProfilingModeNative,
+ switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative},
+ {flag_descriptions::kEnableHeapProfilingTaskProfiler,
+ switches::kEnableHeapProfiling,
+ switches::kEnableHeapProfilingTaskProfiler}};
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -2768,6 +2778,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAutoplayPolicyDescription, kOsAll,
MULTI_VALUE_TYPE(kAutoplayPolicyChoices)},
+ {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName,
+ flag_descriptions::kEnableHeapProfilingDescription, kOsAll,
+ MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)},
+
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.

Powered by Google App Engine
This is Rietveld 408576698