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

Unified Diff: services/shell/standalone/context.cc

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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: services/shell/standalone/context.cc
diff --git a/services/shell/standalone/context.cc b/services/shell/standalone/context.cc
index c53d82c313612405891471bbeac8b0e1c2d415be..03c4062ce85c07dea824b6f3086617bb15bc4ee0 100644
--- a/services/shell/standalone/context.cc
+++ b/services/shell/standalone/context.cc
@@ -63,9 +63,7 @@ class Setup {
class TracingInterfaceProvider : public mojom::InterfaceProvider {
public:
- TracingInterfaceProvider(Tracer* tracer,
- mojom::InterfaceProviderRequest request)
- : tracer_(tracer), binding_(this, std::move(request)) {}
+ explicit TracingInterfaceProvider(Tracer* tracer) : tracer_(tracer) {}
~TracingInterfaceProvider() override {}
// mojom::InterfaceProvider:
@@ -80,7 +78,6 @@ class TracingInterfaceProvider : public mojom::InterfaceProvider {
private:
Tracer* tracer_;
- mojo::StrongBinding<mojom::InterfaceProvider> binding_;
DISALLOW_COPY_AND_ASSIGN(TracingInterfaceProvider);
};
@@ -174,7 +171,8 @@ void Context::Init(std::unique_ptr<InitParams> init_params) {
mojom::InterfaceProviderPtr tracing_remote_interfaces;
mojom::InterfaceProviderPtr tracing_local_interfaces;
- new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces));
+ mojo::MakeStrongBinding(base::MakeUnique<TracingInterfaceProvider>(&tracer_),
+ mojo::GetProxy(&tracing_local_interfaces));
std::unique_ptr<ConnectParams> params(new ConnectParams);
params->set_source(CreateServiceManagerIdentity());
« no previous file with comments | « services/navigation/view_impl.cc ('k') | services/ui/gpu/display_compositor/compositor_frame_sink_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698