Index: mojo/shell/dbus_service_loader_linux.cc |
diff --git a/mojo/shell/dbus_service_loader_linux.cc b/mojo/shell/dbus_service_loader_linux.cc |
index af4e0d4422ed058d9ef7c52552218c0e01d46b87..af0556d09eac46b975c75311a8015831eeb9df2d 100644 |
--- a/mojo/shell/dbus_service_loader_linux.cc |
+++ b/mojo/shell/dbus_service_loader_linux.cc |
@@ -150,9 +150,17 @@ DBusServiceLoader::~DBusServiceLoader() { |
DCHECK(url_to_load_context_.empty()); |
} |
-void DBusServiceLoader::LoadService(ServiceManager* manager, |
- const GURL& url, |
- ScopedMessagePipeHandle shell_handle) { |
+void DBusServiceLoader::LoadService( |
+ ServiceManager* manager, |
+ const GURL& url, |
+ scoped_refptr<LoadServiceCallbacks> callbacks) { |
+ // TODO(aa): This could be delayed until later, when we know that loading is |
+ // going to succeed. |
+ ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); |
+ if (!shell_handle.is_valid()) { |
DaveMoore
2014/08/06 20:50:46
Nit: no braces
Aaron Boodman
2014/08/06 22:49:29
Done.
|
+ return; |
+ } |
+ |
DCHECK(url.SchemeIs("dbus")); |
DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end()); |
url_to_load_context_[url] = |