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

Unified Diff: mojo/shell/identity.h

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
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/connect_util.h ('k') | mojo/shell/identity.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/identity.h
diff --git a/mojo/shell/identity.h b/mojo/shell/identity.h
index 921c839b47950c3948c90f4931d5dcb185d11855..7d33295df65e0e647586356721582e144133f7a0 100644
--- a/mojo/shell/identity.h
+++ b/mojo/shell/identity.h
@@ -20,7 +20,6 @@ using AllowedInterfaces = std::set<std::string>;
// more details.
using CapabilityFilter = std::map<std::string, AllowedInterfaces>;
-
// Represents the identity of an application.
// |name| is the structured name of the application.
// |qualifier| is a string that allows to tie a specific instance of an
@@ -31,12 +30,12 @@ using CapabilityFilter = std::map<std::string, AllowedInterfaces>;
class Identity {
public:
Identity();
- // Assumes user = mojom::Connector::kUserRoot.
+ // Assumes user = mojom::kRootUserID.
// Used in tests or for shell-initiated connections.
explicit Identity(const std::string& in_name);
Identity(const std::string& in_name,
const std::string& in_qualifier,
- uint32_t user_id);
+ const std::string& user_id);
Identity(const Identity& other);
~Identity();
@@ -45,8 +44,8 @@ class Identity {
bool operator==(const Identity& other) const;
const std::string& name() const { return name_; }
- uint32_t user_id() const { return user_id_; }
- void set_user_id(uint32_t user_id) { user_id_ = user_id; }
+ const std::string& user_id() const { return user_id_; }
+ void set_user_id(const std::string& user_id) { user_id_ = user_id; }
const std::string& qualifier() const { return qualifier_; }
void set_filter(const CapabilityFilter& filter) { filter_ = filter; }
const CapabilityFilter& filter() const { return filter_; }
@@ -55,7 +54,7 @@ class Identity {
std::string name_;
std::string qualifier_;
- uint32_t user_id_;
+ std::string user_id_;
// TODO(beng): CapabilityFilter is not currently included in equivalence
// checks for Identity since we're not currently clear on the
« no previous file with comments | « mojo/shell/connect_util.h ('k') | mojo/shell/identity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698