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

Unified Diff: services/tracing/tracing_app.cc

Issue 1532893003: Tidy up the debugger. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-2
Patch Set: rebase Created 4 years, 11 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 | « services/debugger/debugger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/tracing/tracing_app.cc
diff --git a/services/tracing/tracing_app.cc b/services/tracing/tracing_app.cc
index 8689d3a9a7752b11486380e3be0901fcfc71e8bf..62cec7017db3240cae09deb5ffe3e03eb823cac1 100644
--- a/services/tracing/tracing_app.cc
+++ b/services/tracing/tracing_app.cc
@@ -10,11 +10,9 @@
namespace tracing {
-TracingApp::TracingApp() : collector_binding_(this), tracing_active_(false) {
-}
+TracingApp::TracingApp() : collector_binding_(this), tracing_active_(false) {}
-TracingApp::~TracingApp() {
-}
+TracingApp::~TracingApp() {}
bool TracingApp::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
@@ -40,6 +38,11 @@ bool TracingApp::ConfigureIncomingConnection(
// mojo::InterfaceFactory<TraceCollector> implementation.
void TracingApp::Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<TraceCollector> request) {
+ if (collector_binding_.is_bound()) {
+ LOG(ERROR) << "Another application is already connected to tracing.";
+ return;
+ }
+
collector_binding_.Bind(request.Pass());
}
« no previous file with comments | « services/debugger/debugger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698