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

Unified Diff: chrome/browser/chromeos/login/user.cc

Issue 10805007: [cros] UserManager cleanup regarding stub/demo users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused fields and fix compile Created 8 years, 5 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: chrome/browser/chromeos/login/user.cc
diff --git a/chrome/browser/chromeos/login/user.cc b/chrome/browser/chromeos/login/user.cc
index e8c64fb1e5c068872bccd0eb91a4726d9c905988..ab451002f2114121a1b1243fa72f014356d2e3f1 100644
--- a/chrome/browser/chromeos/login/user.cc
+++ b/chrome/browser/chromeos/login/user.cc
@@ -29,22 +29,23 @@ std::string GetUserName(const std::string& email) {
} // namespace
-User::User(const std::string& email, bool is_guest)
+// The demo user is represented by a domainless username.
+const char kDemoUser[] = "demouser";
+// Incognito user is represented by an empty string (since some code already
+// depends on that and it's hard to figure out what).
+const char kGuestUser[] = "";
+
+User::User(const std::string& email)
: email_(email),
user_image_(*ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
kDefaultImageResources[0])),
oauth_token_status_(OAUTH_TOKEN_STATUS_UNKNOWN),
image_index_(kInvalidImageIndex),
- image_is_stub_(false),
- is_guest_(is_guest) {
+ image_is_stub_(false) {
// The email address of a demo user is for internal purposes only,
// never meant for display.
- if (email != kDemoUser) {
+ if (!is_demo_user())
display_email_ = email;
- is_demo_user_ = false;
- } else {
- is_demo_user_ = true;
- }
}
User::~User() {}

Powered by Google App Engine
This is Rietveld 408576698