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

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

Issue 11419184: Add public accounts to UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-upload against the correct upstream commit. Created 8 years, 1 month 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 646123e746c845e023992bd1c30d6e0cc4dc861a..35beb814375110a764de21b695d7bcfe60487cc3 100644
--- a/chrome/browser/chromeos/login/user.cc
+++ b/chrome/browser/chromeos/login/user.cc
@@ -56,6 +56,8 @@ class GuestUser : public User {
// Overridden from User:
virtual UserType GetType() const OVERRIDE;
+ virtual bool is_device_local_account() const OVERRIDE;
+ virtual bool is_builtin_account() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(GuestUser);
@@ -68,6 +70,7 @@ class RetailModeUser : public User {
// Overridden from User:
virtual UserType GetType() const OVERRIDE;
+ virtual bool is_device_local_account() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(RetailModeUser);
@@ -80,6 +83,7 @@ class PublicAccountUser : public User {
// Overridden from User:
virtual UserType GetType() const OVERRIDE;
+ virtual bool is_device_local_account() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(PublicAccountUser);
@@ -107,6 +111,14 @@ bool User::can_lock() const {
return false;
}
+bool User::is_device_local_account() const {
+ return false;
+}
+
+bool User::is_builtin_account() const {
+ return false;
+}
+
User* User::CreateRegularUser(const std::string& email) {
return new RegularUser(email);
}
@@ -178,6 +190,14 @@ User::UserType GuestUser::GetType() const {
return USER_TYPE_GUEST;
}
+bool GuestUser::is_device_local_account() const {
+ return true;
+}
+
+bool GuestUser::is_builtin_account() const {
+ return true;
+}
+
RetailModeUser::RetailModeUser() : User(kRetailModeUserEMail) {
set_display_email("");
}
@@ -188,6 +208,10 @@ User::UserType RetailModeUser::GetType() const {
return USER_TYPE_RETAIL_MODE;
}
+bool RetailModeUser::is_device_local_account() const {
+ return true;
+}
+
PublicAccountUser::PublicAccountUser(const std::string& email) : User(email) {
}
@@ -197,4 +221,8 @@ User::UserType PublicAccountUser::GetType() const {
return USER_TYPE_PUBLIC_ACCOUNT;
}
+bool PublicAccountUser::is_device_local_account() const {
+ return true;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698