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

Unified Diff: mojo/shell/public/cpp/connection.h

Issue 1769163002: Add a instance groups to Connect(), and introduce an Identity struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 | « mojo/shell/public/cpp/BUILD.gn ('k') | mojo/shell/public/cpp/connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/connection.h
diff --git a/mojo/shell/public/cpp/connection.h b/mojo/shell/public/cpp/connection.h
index ce1401c8782c25b3bfcc494b001222d5565f175e..d3b3b8a1e240e98cf0740f0ad1a78626b43111ac 100644
--- a/mojo/shell/public/cpp/connection.h
+++ b/mojo/shell/public/cpp/connection.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "mojo/shell/public/cpp/connect.h"
+#include "mojo/shell/public/cpp/identity.h"
#include "mojo/shell/public/cpp/interface_registry.h"
#include "mojo/shell/public/interfaces/connector.mojom.h"
#include "mojo/shell/public/interfaces/interface_provider.mojom.h"
@@ -88,14 +89,12 @@ class Connection {
// same as the value returned by GetRemoveApplicationName().
virtual const std::string& GetConnectionName() = 0;
- // Returns the name identifying the remote application on this connection.
- virtual const std::string& GetRemoteApplicationName() = 0;
-
- // Returns the User ID for the remote application. Prior to the Connect()
- // callback being fired, this will return the value passed via Connect().
- // After the Connect() callback (call AddRemoteIDCallback to register one)
- // this will return the actual user id the shell ran the target as.
- virtual const std::string& GetRemoteUserID() const = 0;
+ // Returns the remote identity. While the connection is in the pending state,
+ // the user_id() field will be the value passed via Connect(). After the
+ // connection is completed, it will change to the value assigned by the shell.
+ // Call AddConnectionCompletedClosure() to schedule a closure to be run when
+ // the resolved user id is available.
+ virtual const Identity& GetRemoteIdentity() const = 0;
// Register a handler to receive an error notification on the pipe to the
// remote application's InterfaceProvider.
« no previous file with comments | « mojo/shell/public/cpp/BUILD.gn ('k') | mojo/shell/public/cpp/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698