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

Unified Diff: mojo/shell/public/cpp/lib/connection_impl.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/lib/application_test_base.cc ('k') | mojo/shell/public/cpp/lib/connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/connection_impl.h
diff --git a/mojo/shell/public/cpp/lib/connection_impl.h b/mojo/shell/public/cpp/lib/connection_impl.h
index e0a03d4d33fc87e98cf8d7c7797910c830667f05..3247a5a73ea094989b54644deaa8213f3ca9d97c 100644
--- a/mojo/shell/public/cpp/lib/connection_impl.h
+++ b/mojo/shell/public/cpp/lib/connection_impl.h
@@ -12,6 +12,7 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/shell/public/cpp/connection.h"
+#include "mojo/shell/public/cpp/identity.h"
#include "mojo/shell/public/interfaces/connector.mojom.h"
#include "mojo/shell/public/interfaces/interface_provider.mojom.h"
@@ -28,9 +29,8 @@ class ConnectionImpl : public Connection {
// an application to expose to another application. If this set contains only
// the string value "*" all interfaces may be exposed.
ConnectionImpl(const std::string& connection_name,
- const std::string& remote_name,
+ const Identity& remote,
uint32_t remote_id,
- const std::string& remote_user_id,
shell::mojom::InterfaceProviderPtr remote_interfaces,
shell::mojom::InterfaceProviderRequest local_interfaces,
const std::set<std::string>& allowed_interfaces,
@@ -42,8 +42,7 @@ class ConnectionImpl : public Connection {
private:
// Connection:
const std::string& GetConnectionName() override;
- const std::string& GetRemoteApplicationName() override;
- const std::string& GetRemoteUserID() const override;
+ const Identity& GetRemoteIdentity() const override;
void SetConnectionLostClosure(const Closure& handler) override;
shell::mojom::ConnectResult GetResult() const override;
bool IsPending() const override;
@@ -59,13 +58,12 @@ class ConnectionImpl : public Connection {
uint32_t target_application_id);
const std::string connection_name_;
- const std::string remote_name_;
+ Identity remote_;
+ uint32_t remote_id_ = shell::mojom::kInvalidInstanceID;
State state_;
shell::mojom::ConnectResult result_ = shell::mojom::ConnectResult::SUCCEEDED;
- uint32_t remote_id_ = shell::mojom::kInvalidInstanceID;
std::vector<Closure> connection_completed_callbacks_;
- std::string remote_user_id_ = shell::mojom::kInheritUserID;
InterfaceRegistry local_registry_;
shell::mojom::InterfaceProviderPtr remote_interfaces_;
« no previous file with comments | « mojo/shell/public/cpp/lib/application_test_base.cc ('k') | mojo/shell/public/cpp/lib/connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698