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

Unified Diff: services/navigation/navigation.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
« no previous file with comments | « services/file/file_system.cc ('k') | services/navigation/view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/navigation.cc
diff --git a/services/navigation/navigation.cc b/services/navigation/navigation.cc
index b9db546bf80daeb9388e17b9cfd59c7e66d170b1..824284e988af66440d737c6b9223b38aa6a313e7 100644
--- a/services/navigation/navigation.cc
+++ b/services/navigation/navigation.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/navigation/view_impl.h"
#include "services/shell/public/cpp/connector.h"
@@ -20,9 +21,10 @@ void CreateViewOnViewTaskRunner(
mojom::ViewClientPtr client,
mojom::ViewRequest request,
std::unique_ptr<shell::ServiceContextRef> context_ref) {
- // Owns itself.
- new ViewImpl(std::move(connector), client_user_id, std::move(client),
- std::move(request), std::move(context_ref));
+ mojo::MakeStrongBinding(
+ base::MakeUnique<ViewImpl>(std::move(connector), client_user_id,
+ std::move(client), std::move(context_ref)),
+ std::move(request));
}
} // namespace
« no previous file with comments | « services/file/file_system.cc ('k') | services/navigation/view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698