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

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

Issue 1743473002: Change Mojo URLs to structured names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@18collapse
Patch Set: . Created 4 years, 10 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/connector_impl.h ('k') | mojo/shell/public/cpp/lib/interface_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/connector_impl.cc
diff --git a/mojo/shell/public/cpp/lib/connector_impl.cc b/mojo/shell/public/cpp/lib/connector_impl.cc
index 5adf92151849300849d5e8fcb797c7c2ef8cbd8c..0e6b5ab9a689584ab3e2069c93103a6d7f7bee19 100644
--- a/mojo/shell/public/cpp/lib/connector_impl.cc
+++ b/mojo/shell/public/cpp/lib/connector_impl.cc
@@ -8,8 +8,8 @@
namespace mojo {
-Connector::ConnectParams::ConnectParams(const std::string& url)
- : url_(url),
+Connector::ConnectParams::ConnectParams(const std::string& name)
+ : name_(name),
user_id_(shell::mojom::Connector::kUserInherit) {
}
Connector::ConnectParams::~ConnectParams() {}
@@ -24,8 +24,8 @@ ConnectorImpl::ConnectorImpl(shell::mojom::ConnectorPtr connector,
}
ConnectorImpl::~ConnectorImpl() {}
-scoped_ptr<Connection> ConnectorImpl::Connect(const std::string& url) {
- ConnectParams params(url);
+scoped_ptr<Connection> ConnectorImpl::Connect(const std::string& name) {
+ ConnectParams params(name);
return Connect(&params);
}
@@ -41,7 +41,7 @@ scoped_ptr<Connection> ConnectorImpl::Connect(ConnectParams* params) {
DCHECK(thread_checker_->CalledOnValidThread());
DCHECK(params);
- std::string application_url = params->url().spec();
+ std::string application_name = params->name();
// We allow all interfaces on outgoing connections since we are presumably in
// a position to know who we're talking to.
// TODO(beng): is this a valid assumption or do we need to figure some way to
@@ -55,10 +55,10 @@ scoped_ptr<Connection> ConnectorImpl::Connect(ConnectParams* params) {
shell::mojom::InterfaceProviderRequest remote_request =
GetProxy(&remote_interfaces);
scoped_ptr<internal::ConnectionImpl> registry(new internal::ConnectionImpl(
- application_url, application_url,
+ application_name, application_name,
shell::mojom::Connector::kInvalidApplicationID, params->user_id(),
std::move(remote_interfaces), std::move(local_request), allowed));
- connector_->Connect(application_url,
+ connector_->Connect(application_name,
params->user_id(),
std::move(remote_request),
std::move(local_interfaces),
« no previous file with comments | « mojo/shell/public/cpp/lib/connector_impl.h ('k') | mojo/shell/public/cpp/lib/interface_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698