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

Unified Diff: chromeos/login/user_names.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: chromeos/login/user_names.h
diff --git a/chromeos/login/user_names.h b/chromeos/login/user_names.h
index 718d7aeb797e549c8c662579cdb4bc94c3515b40..fb980a822241a91af3403c590eb7c6b1e0ddb782 100644
--- a/chromeos/login/user_names.h
+++ b/chromeos/login/user_names.h
@@ -9,23 +9,31 @@
#include "chromeos/chromeos_export.h"
+namespace user_manager {
+class UserID;
+}
+
namespace chromeos {
namespace login {
// Username for stub login when not running on ChromeOS.
-CHROMEOS_EXPORT extern const char* kStubUser;
+CHROMEOS_EXPORT user_manager::UserID GetStubUserID();
-// Username for the login screen. It is only used to identify login screen
+// User ID for the login screen. It is only used to identify login screen
// tries to set default wallpaper. It is not a real user.
-CHROMEOS_EXPORT extern const char* kSignInUser;
-
-// Magic e-mail addresses are bad. They exist here because some code already
-// depends on them and it is hard to figure out what. Any user types added in
-// the future should be identified by a new |UserType|, not a new magic e-mail
-// address.
-// Username for Guest session user.
-CHROMEOS_EXPORT extern const char* kGuestUserName;
+CHROMEOS_EXPORT user_manager::UserID GetSignInUserID();
+
+// Magic e-mail addresses / user ids are bad. They exist here because some code
+// already depends on them and it is hard to figure out what. Any user types
+// added in the future should be identified by a new |UserType|, not a new magic
+// e-mail address.
+
+// Username for Guest session user (for UserID::Deserialize only).
+CHROMEOS_EXPORT extern const char* kLegacyGuestUserName;
+
+// User id for Guest session user.
+CHROMEOS_EXPORT user_manager::UserID GetGuestUserID();
// Domain that is used for all supervised users.
CHROMEOS_EXPORT extern const char* kSupervisedUserDomain;

Powered by Google App Engine
This is Rietveld 408576698