Index: content/app/content_main_runner.cc |
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
index 863f02be27411b4490f047a8b4d8d944d6216518..43c0d006ccadb7f294366c41e4489e00ba5db2f7 100644 |
--- a/content/app/content_main_runner.cc |
+++ b/content/app/content_main_runner.cc |
@@ -21,6 +21,7 @@ |
#include "base/process/memory.h" |
#include "base/process/process_handle.h" |
#include "base/profiler/alternate_timer.h" |
+#include "base/profiler/scoped_tracker.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
@@ -568,6 +569,12 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
base::EnableTerminationOnHeapCorruption(); |
+ // TODO(yiyaoliu, vadimt): Remove this once crbug.com/453640 is fixed. |
+ // Enable profiler recording right after command line is initialized so that |
+ // browser startup can be instrumented. |
+ if (delegate_ && delegate_->ShouldEnableProfilerRecording()) |
+ tracked_objects::ScopedTracker::Enable(); |
+ |
#if !defined(OS_IOS) |
SetProcessTitleFromCommandLine(argv); |
#endif |