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

Unified Diff: content/app/content_main_runner.cc

Issue 1177853003: [Startup Tracing] Enable startup tracing from config file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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
« no previous file with comments | « content/app/android/library_loader_hooks.cc ('k') | content/child/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index cdb519f53a75c7737c87292ba19cb8c0c89635a1..b59c95a6acf3600f4b6793e8a1697355df4e9f72 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -27,6 +27,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
+#include "components/tracing/startup_tracing.h"
#include "content/browser/browser_main.h"
#include "content/common/set_process_title.h"
#include "content/common/url_schemes.h"
@@ -631,7 +632,12 @@ class ContentMainRunnerImpl : public ContentMainRunner {
base::trace_event::TraceLog::GetInstance()->SetEnabled(
trace_config,
base::trace_event::TraceLog::RECORDING_MODE);
+ } else if (process_type != switches::kZygoteProcess) {
+ // There is no need to schedule stopping tracing in this case. Telemetry
+ // will stop tracing on demand later.
+ tracing::EnableStartupTracingIfConfigFileExists();
}
+
#if defined(OS_WIN)
// Enable exporting of events to ETW if requested on the command line.
if (command_line.HasSwitch(switches::kTraceExportEventsToETW))
« no previous file with comments | « content/app/android/library_loader_hooks.cc ('k') | content/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698