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

Unified Diff: components/filesystem/file_system_app.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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_system_app.h ('k') | components/font_service/font_service_app.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 dd1d24b01085ecbd19c5ce4853c64b4fbb44ff65..e12cba12108749983ee9e4a59486068ab41ee570 100644
--- a/components/filesystem/file_system_app.cc
+++ b/components/filesystem/file_system_app.cc
@@ -39,7 +39,9 @@ const char kUserDataDir[] = "user-data-dir";
} // namespace filesystem
-FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {}
+FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {
+ registry_.AddInterface<mojom::FileSystem>(this);
+}
FileSystemApp::~FileSystemApp() {}
@@ -47,10 +49,12 @@ void FileSystemApp::OnStart() {
tracing_.Initialize(context()->connector(), context()->identity().name());
}
-bool FileSystemApp::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::FileSystem>(this);
- return true;
+void FileSystemApp::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
// |InterfaceFactory<Files>| implementation:
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698