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

Unified Diff: mandoline/app/desktop/launcher_process.cc

Issue 1315463002: [Startup Tracing] Add --trace-config-file flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix Created 5 years, 4 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: mandoline/app/desktop/launcher_process.cc
diff --git a/mandoline/app/desktop/launcher_process.cc b/mandoline/app/desktop/launcher_process.cc
index afa1d15bcb578d77371cdb8297e32c0b063228c6..084605daf9ff4ad8b718f486e419b90178295eb2 100644
--- a/mandoline/app/desktop/launcher_process.cc
+++ b/mandoline/app/desktop/launcher_process.cc
@@ -15,7 +15,7 @@
#include "base/message_loop/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/trace_event/trace_event.h"
-#include "components/tracing/startup_tracing.h"
+#include "components/tracing/trace_config_file.h"
#include "components/tracing/tracing_switches.h"
#include "mandoline/app/core_services_initialization.h"
#include "mandoline/app/desktop/launcher_process.h"
@@ -91,9 +91,12 @@ int LauncherProcessMain(int argc, char** argv) {
base::trace_event::TraceLog::GetInstance()->SetEnabled(
trace_config, base::trace_event::TraceLog::RECORDING_MODE);
} else {
- // |g_tracing| is not touched in this case and Telemetry will stop tracing
- // on demand later.
- tracing::EnableStartupTracingIfConfigFileExists();
+ g_tracing = true;
msw 2015/08/25 18:06:49 Shouldn't this only be set true if the next condit
Zhen Wang 2015/08/25 18:18:37 Oh, right. Fixed. Thanks!
+ if (tracing::TraceConfigFile::GetInstance()->IsEnabled()) {
+ base::trace_event::TraceLog::GetInstance()->SetEnabled(
+ tracing::TraceConfigFile::GetInstance()->GetTraceConfig(),
+ base::trace_event::TraceLog::RECORDING_MODE);
+ }
}
// We want the runner::Context to outlive the MessageLoop so that pipes are

Powered by Google App Engine
This is Rietveld 408576698