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

Unified Diff: mojo/shell/identity.h

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: mojo/shell/identity.h
diff --git a/mojo/shell/identity.h b/mojo/shell/identity.h
index e5a349b6469aa9722b1dedabf1bfc371ad0a51e5..fedc84a371c2f29399f1a09caf8179262ee99490 100644
--- a/mojo/shell/identity.h
+++ b/mojo/shell/identity.h
@@ -21,10 +21,15 @@ namespace shell {
class Identity {
public:
Identity();
+ // Assumes user = mojom::Shell::kUserRoot.
+ // Used in tests or for shell-initiated connections.
explicit Identity(const GURL& in_url);
- Identity(const GURL& in_url, const std::string& in_qualifier);
Identity(const GURL& in_url,
const std::string& in_qualifier,
+ uint32_t user_id);
+ Identity(const GURL& in_url,
+ const std::string& in_qualifier,
+ uint32_t user,
CapabilityFilter filter);
~Identity();
@@ -33,6 +38,8 @@ class Identity {
bool operator==(const Identity& other) const;
const GURL& url() const { return url_; }
+ const uint32_t user_id() const { return user_id_; }
+ void set_user_id(uint32_t user_id) { user_id_ = user_id; }
const std::string& qualifier() const { return qualifier_; }
const CapabilityFilter& filter() const { return filter_; }
@@ -40,6 +47,8 @@ class Identity {
GURL url_;
std::string qualifier_;
+ uint32_t user_id_;
+
// TODO(beng): CapabilityFilter is not currently included in equivalence
// checks for Identity since we're not currently clear on the
// policy for instance disambiguation. Need to figure this out.
« no previous file with comments | « mojo/shell/connect_util.h ('k') | mojo/shell/identity.cc » ('j') | mojo/shell/identity.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698