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

Unified Diff: components/filesystem/file_system_app.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 | « components/filesystem/file_impl.cc ('k') | components/filesystem/file_system_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/file_system_app.cc
diff --git a/components/filesystem/file_system_app.cc b/components/filesystem/file_system_app.cc
index 2be93f2574fcd19cf14f92e3d5da609c71d60629..054545d9a1ff22088fe0521d955ff7d3d198fdb7 100644
--- a/components/filesystem/file_system_app.cc
+++ b/components/filesystem/file_system_app.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/connector.h"
@@ -51,9 +52,10 @@ bool FileSystemApp::OnConnect(const shell::Identity& remote_identity,
// |InterfaceFactory<Files>| implementation:
void FileSystemApp::Create(const shell::Identity& remote_identity,
- mojo::InterfaceRequest<mojom::FileSystem> request) {
- new FileSystemImpl(remote_identity, std::move(request), GetUserDataDir(),
- lock_table_);
+ mojom::FileSystemRequest request) {
+ mojo::MakeStrongBinding(base::MakeUnique<FileSystemImpl>(
+ remote_identity, GetUserDataDir(), lock_table_),
+ std::move(request));
}
//static
« no previous file with comments | « components/filesystem/file_impl.cc ('k') | components/filesystem/file_system_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698