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

Unified Diff: mojo/shell/public/cpp/lib/shell_connection.cc

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/shell_client.cc ('k') | mojo/shell/public/cpp/lib/shell_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/shell_connection.cc
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc
index 0abac7e0d21a7ff5ec26d67a02843c6b1cc6700c..8ee729d0c50c06211169570f3f24cfd59306d66c 100644
--- a/mojo/shell/public/cpp/lib/shell_connection.cc
+++ b/mojo/shell/public/cpp/lib/shell_connection.cc
@@ -35,27 +35,25 @@ void ShellConnection::WaitForInitialize() {
// ShellConnection, shell::mojom::ShellClient implementation:
void ShellConnection::Initialize(shell::mojom::ConnectorPtr connector,
- const String& name,
- const String& user_id,
+ shell::mojom::IdentityPtr identity,
uint32_t id) {
connector_.reset(new ConnectorImpl(std::move(connector)));
binding_.set_connection_error_handler(
base::Bind(&ShellConnection::OnConnectionError,
weak_factory_.GetWeakPtr()));
- client_->Initialize(connector_.get(), name, user_id, id);
+ client_->Initialize(connector_.get(), identity.To<Identity>(), id);
}
void ShellConnection::AcceptConnection(
- const String& requestor_name,
- const String& requestor_user_id,
- uint32_t requestor_id,
+ shell::mojom::IdentityPtr source,
+ uint32_t source_id,
shell::mojom::InterfaceProviderRequest local_interfaces,
shell::mojom::InterfaceProviderPtr remote_interfaces,
Array<String> allowed_interfaces,
const String& name) {
scoped_ptr<Connection> registry(new internal::ConnectionImpl(
- name, requestor_name, requestor_id, requestor_user_id,
- std::move(remote_interfaces), std::move(local_interfaces),
+ name, source.To<Identity>(), source_id, std::move(remote_interfaces),
+ std::move(local_interfaces),
allowed_interfaces.To<std::set<std::string>>(),
Connection::State::CONNECTED));
if (!client_->AcceptConnection(registry.get()))
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_client.cc ('k') | mojo/shell/public/cpp/lib/shell_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698