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

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

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/connection.h ('k') | mojo/shell/public/cpp/lib/application_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/connector.h
diff --git a/mojo/shell/public/cpp/connector.h b/mojo/shell/public/cpp/connector.h
index af13467ca73994e6e23971a9e579b9d8e7663d41..8f7fe64f65f2296c0f26b4d18d025ebe80ee9b9e 100644
--- a/mojo/shell/public/cpp/connector.h
+++ b/mojo/shell/public/cpp/connector.h
@@ -7,7 +7,6 @@
#include "mojo/shell/public/cpp/connection.h"
#include "mojo/shell/public/interfaces/shell.mojom.h"
-#include "url/gurl.h"
namespace mojo {
@@ -31,15 +30,15 @@ class Connector {
class ConnectParams {
public:
- explicit ConnectParams(const std::string& url);
+ explicit ConnectParams(const std::string& name);
~ConnectParams();
- const GURL& url() { return url_; }
+ const std::string& name() { return name_; }
void set_user_id(uint32_t user_id) { user_id_ = user_id; }
uint32_t user_id() const { return user_id_; }
private:
- GURL url_;
+ std::string name_;
uint32_t user_id_;
DISALLOW_COPY_AND_ASSIGN(ConnectParams);
@@ -51,10 +50,10 @@ class Connector {
// Once this method is called, this object is bound to the thread on which the
// call took place. To pass to another thread, call Clone() and pass the
// result.
- virtual scoped_ptr<Connection> Connect(const std::string& url) = 0;
+ virtual scoped_ptr<Connection> Connect(const std::string& name) = 0;
virtual scoped_ptr<Connection> Connect(ConnectParams* params) = 0;
- // Connect to application identified by |request->url| and connect to the
+ // Connect to application identified by |request->name| and connect to the
// service implementation of the interface identified by |Interface|.
template <typename Interface>
void ConnectToInterface(ConnectParams* params, InterfacePtr<Interface>* ptr) {
@@ -63,9 +62,9 @@ class Connector {
connection->GetInterface(ptr);
}
template <typename Interface>
- void ConnectToInterface(const std::string& url,
+ void ConnectToInterface(const std::string& name,
InterfacePtr<Interface>* ptr) {
- ConnectParams params(url);
+ ConnectParams params(name);
return ConnectToInterface(&params, ptr);
}
« no previous file with comments | « mojo/shell/public/cpp/connection.h ('k') | mojo/shell/public/cpp/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698