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

Unified Diff: services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java

Issue 2374213002: Revert of Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: 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/shell/public/cpp/interface_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java
diff --git a/services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java b/services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java
index 5838a64992b6b368524cc387986119a823d199a2..cfb069b20901c8edfd38e531c5f09b4a0ccbbf8d 100644
--- a/services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java
+++ b/services/shell/public/java/src/org/chromium/services/shell/InterfaceRegistry.java
@@ -19,7 +19,7 @@
* implement an InterfaceFactory that creates instances of your implementation
* and register that on the registry with a Manager for the interface like this:
*
- * registry.addInterface(InterfaceType.MANAGER, factory);
+ * registry.addInterface(factory, InterfaceType.MANAGER);
*/
public class InterfaceRegistry implements InterfaceProvider {
private final Map<String, InterfaceBinder> mBinders = new HashMap<String, InterfaceBinder>();
@@ -67,12 +67,7 @@
}
public void bindToMessagePipe(MessagePipeHandle pipe) {
- I impl = mFactory.createImpl();
- if (impl == null) {
- pipe.close();
- return;
- }
- mManager.bind(impl, pipe);
+ mManager.bind(mFactory.createImpl(), pipe);
}
}
}
« no previous file with comments | « services/shell/public/cpp/interface_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698