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

Unified Diff: sky/tools/debugger/debugger.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
« shell/tracer.cc ('K') | « shell/tracer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/debugger/debugger.cc
diff --git a/sky/tools/debugger/debugger.cc b/sky/tools/debugger/debugger.cc
index c8d78348191b7ab5428f32e6eb27ed57990bf09e..06dd74630f728637a4a547e4a6d00a8f39ee8862 100644
--- a/sky/tools/debugger/debugger.cc
+++ b/sky/tools/debugger/debugger.cc
@@ -34,7 +34,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
private:
// mojo::ApplicationDelegate:
void Initialize(mojo::ApplicationImpl* app) override {
- app->ConnectToService("mojo:tracing", &tracing_);
+ app_ = app;
app->ConnectToService("mojo:window_manager", &window_manager_);
// Format: --args-for="app_url command_port"
@@ -140,6 +140,8 @@ class SkyDebugger : public mojo::ApplicationDelegate,
return;
}
+ if (!tracing_)
+ app_->ConnectToService("mojo:tracing", &tracing_);
is_tracing_ = true;
mojo::DataPipe pipe;
tracing_->Start(pipe.producer_handle.Pass(), mojo::String("*"));
@@ -185,6 +187,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
}
bool is_tracing_;
+ mojo::ApplicationImpl* app_;
mojo::WindowManagerPtr window_manager_;
tracing::TraceCoordinatorPtr tracing_;
std::string url_;
« shell/tracer.cc ('K') | « shell/tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698