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

Unified Diff: shell/desktop/main.cc

Issue 1105773002: Teach the mojo_shell --trace-startup flag to gather data from services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « shell/context.cc ('k') | shell/tracer.h » ('j') | shell/tracer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/desktop/main.cc
diff --git a/shell/desktop/main.cc b/shell/desktop/main.cc
index 801574d0b9e99c876ff8fb70e9563c9e0b2142df..6139245aa70c35847f95b86bf2d10b37aa905203 100644
--- a/shell/desktop/main.cc
+++ b/shell/desktop/main.cc
@@ -91,14 +91,9 @@ int main(int argc, char** argv) {
// We want the shell::Context to outlive the MessageLoop so that pipes are all
// gracefully closed / error-out before we try to shut the Context down.
- shell::Context shell_context;
+ shell::Context shell_context(&tracer);
{
base::MessageLoop message_loop;
- if (!shell_context.Init()) {
- Usage();
- return 1;
- }
-
if (trace_startup) {
message_loop.PostDelayedTask(
FROM_HERE, base::Bind(&shell::Tracer::StopAndFlushToFile,
@@ -106,6 +101,11 @@ int main(int argc, char** argv) {
base::TimeDelta::FromSeconds(5));
}
+ if (!shell_context.Init()) {
+ Usage();
+ return 1;
+ }
+
// The mojo_shell --args-for command-line switch is handled specially
// because it can appear more than once. The base::CommandLine class
// collapses multiple occurrences of the same switch.
« no previous file with comments | « shell/context.cc ('k') | shell/tracer.h » ('j') | shell/tracer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698