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

Unified Diff: services/tracing/tracing_app.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
Patch Set: Created 4 years, 7 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/tracing/tracing_app.h ('k') | services/ui/input_manager/input_manager_app.h » ('j') | 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 915ed03e1f9aa84ef95e8aeb524b584fd8713ab5..0413158526617ad8e859ff9fa3248c70b522fd52 100644
--- a/services/tracing/tracing_app.cc
+++ b/services/tracing/tracing_app.cc
@@ -17,25 +17,26 @@ TracingApp::~TracingApp() {}
bool TracingApp::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
- connection->AddService<TraceCollector>(this);
+ connection->GetServiceProviderImpl().AddService<TraceCollector>(
+ [this](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<TraceCollector> trace_collector_request) {
+ if (collector_binding_.is_bound()) {
+ LOG(ERROR) << "Another application is already connected to tracing.";
+ return;
+ }
+
+ collector_binding_.Bind(trace_collector_request.Pass());
+ });
+ connection->GetServiceProviderImpl().AddService<TraceProviderRegistry>(
+ [this](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<TraceProviderRegistry>
+ trace_provider_registry_request) {
+ provider_registry_bindings_.AddBinding(
+ this, trace_provider_registry_request.Pass());
+ });
return true;
}
-void TracingApp::Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<TraceCollector> request) {
- if (collector_binding_.is_bound()) {
- LOG(ERROR) << "Another application is already connected to tracing.";
- return;
- }
-
- collector_binding_.Bind(request.Pass());
-}
-
-void TracingApp::Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<TraceProviderRegistry> request) {
- provider_registry_bindings_.AddBinding(this, request.Pass());
-}
-
void TracingApp::Start(mojo::ScopedDataPipeProducerHandle stream,
const mojo::String& categories) {
tracing_categories_ = categories;
« no previous file with comments | « services/tracing/tracing_app.h ('k') | services/ui/input_manager/input_manager_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698