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

Unified Diff: components/user_manager/user.cc

Issue 1865133002: kiosk: Fix kiosk session restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix nits Created 4 years, 8 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 | « components/user_manager/user.h ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user.cc
diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc
index fc7b56c2e5e8f517baf0a47d88a48c75505e5bc9..26e97d1a6c4576bbba3caf119cb40a8ebf9f2410 100644
--- a/components/user_manager/user.cc
+++ b/components/user_manager/user.cc
@@ -79,6 +79,7 @@ class DeviceLocalAccountUserBase : public User {
~DeviceLocalAccountUserBase() override;
// User:
void SetAffiliation(bool) override;
+ bool IsDeviceLocalAccount() const override;
private:
DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountUserBase);
@@ -121,6 +122,11 @@ class PublicAccountUser : public DeviceLocalAccountUserBase {
DISALLOW_COPY_AND_ASSIGN(PublicAccountUser);
};
+User::User(const AccountId& account_id)
+ : account_id_(account_id), user_image_(new UserImage) {}
+
+User::~User() {}
+
std::string User::GetEmail() const {
return display_email();
}
@@ -204,6 +210,10 @@ void User::SetAffiliation(bool is_affiliated) {
is_affiliated_ = is_affiliated;
}
+bool User::IsDeviceLocalAccount() const {
+ return false;
+}
+
User* User::CreateRegularUser(const AccountId& account_id) {
return new RegularUser(account_id);
}
@@ -224,12 +234,6 @@ User* User::CreatePublicAccountUser(const AccountId& account_id) {
return new PublicAccountUser(account_id);
}
-User::User(const AccountId& account_id) : account_id_(account_id),
- user_image_(new UserImage) {}
-
-User::~User() {
-}
-
void User::SetAccountLocale(const std::string& resolved_account_locale) {
account_locale_.reset(new std::string(resolved_account_locale));
}
@@ -306,6 +310,10 @@ void DeviceLocalAccountUserBase::SetAffiliation(bool) {
NOTREACHED();
}
+bool DeviceLocalAccountUserBase::IsDeviceLocalAccount() const {
+ return true;
+}
+
KioskAppUser::KioskAppUser(const AccountId& kiosk_app_account_id)
: DeviceLocalAccountUserBase(kiosk_app_account_id) {
set_display_email(kiosk_app_account_id.GetUserEmail());
« no previous file with comments | « components/user_manager/user.h ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698