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

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

Issue 10805007: [cros] UserManager cleanup regarding stub/demo users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/login/login_status_consumer.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 1bac12651f35021808dbad09203c9983eec9f32e..467a7dd817cbf2ccdd46e657510d9cfc3f3dd4a9 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -14,11 +14,14 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia.h"
-// The demo user is represented by a domainless username.
-const char kDemoUser[] = "demouser";
-
namespace chromeos {
+// Fake username for the demo user.
+extern const char kDemoUser[];
+
+// Username for incognito login.
+extern const char kGuestUser[];
+
// A class representing information about a previously logged in user.
// Each user has a canonical email (username), returned by |email()| and
// may have a different displayed email (in the raw form as entered by user),
@@ -92,8 +95,8 @@ class User {
// The displayed (non-canonical) user email.
std::string display_email() const { return display_email_; }
- bool is_demo_user() const { return is_demo_user_; }
- bool is_guest() const { return is_guest_; }
+ bool is_demo_user() const { return email_ == kDemoUser; }
+ bool is_guest() const { return email_ == kGuestUser; }
private:
friend class UserManagerImpl;
@@ -101,7 +104,7 @@ class User {
friend class UserManagerTest;
// Do not allow anyone else to create new User instances.
- User(const std::string& email, bool is_guest);
+ explicit User(const std::string& email_guest);
~User();
// Setters are private so only UserManager can call them.
« no previous file with comments | « chrome/browser/chromeos/login/login_status_consumer.cc ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698