Chromium Code Reviews| Index: components/user_manager/user.cc |
| diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc |
| index 7035096fe374448b5547ab67913f6b0ecacab11b..22a69db9a6d1c89f20d456d8dc0ff93670db3d85 100644 |
| --- a/components/user_manager/user.cc |
| +++ b/components/user_manager/user.cc |
| @@ -31,7 +31,7 @@ std::string GetUserName(const std::string& email) { |
| // static |
| bool User::TypeHasGaiaAccount(UserType user_type) { |
| return user_type == USER_TYPE_REGULAR || |
| - user_type == USER_TYPE_REGULAR_SUPERVISED; |
| + user_type == USER_TYPE_CHILD; |
| } |
| // Also used for regular supervised users. |
| @@ -43,10 +43,10 @@ class RegularUser : public User { |
| // Overridden from User: |
| virtual UserType GetType() const override; |
| virtual bool CanSyncImage() const override; |
| - virtual void SetIsSupervised(bool is_supervised) override; |
| + virtual void SetIsChild(bool is_child) override; |
| private: |
| - bool is_supervised_; |
| + bool is_child_; |
| DISALLOW_COPY_AND_ASSIGN(RegularUser); |
| }; |
| @@ -134,9 +134,9 @@ std::string User::GetUserID() const { |
| return gaia::CanonicalizeEmail(gaia::SanitizeEmail(email())); |
| } |
| -void User::SetIsSupervised(bool is_supervised) { |
| - VLOG(1) << "Ignoring SetIsSupervised call with param " << is_supervised; |
| - NOTREACHED() << "Calling SetIsSupervised for base User class."; |
| +void User::SetIsChild(bool is_child) { |
| + VLOG(1) << "Ignoring SetIsChild call with param " << is_child; |
| + NOTREACHED() << "Calling SetIsChild for base User class."; |
|
Marc Treib
2014/12/08 13:27:54
This too.
merkulova
2014/12/08 14:56:12
Acknowledged.
|
| } |
| bool User::HasGaiaAccount() const { |
| @@ -146,7 +146,7 @@ bool User::HasGaiaAccount() const { |
| bool User::IsSupervised() const { |
| UserType type = GetType(); |
| return type == USER_TYPE_SUPERVISED || |
| - type == USER_TYPE_REGULAR_SUPERVISED; |
| + type == USER_TYPE_CHILD; |
| } |
| std::string User::GetAccountName(bool use_display_email) const { |
| @@ -250,7 +250,7 @@ void User::SetStubImage(const UserImage& stub_user_image, |
| } |
| RegularUser::RegularUser(const std::string& email) |
| - : User(email), is_supervised_(false) { |
| + : User(email), is_child_(false) { |
| set_can_lock(true); |
| set_display_email(email); |
| } |
| @@ -259,17 +259,17 @@ RegularUser::~RegularUser() { |
| } |
| UserType RegularUser::GetType() const { |
| - return is_supervised_ ? user_manager::USER_TYPE_REGULAR_SUPERVISED : |
| - user_manager::USER_TYPE_REGULAR; |
| + return is_child_ ? user_manager::USER_TYPE_CHILD : |
| + user_manager::USER_TYPE_REGULAR; |
| } |
| bool RegularUser::CanSyncImage() const { |
| return true; |
| } |
| -void RegularUser::SetIsSupervised(bool is_supervised) { |
| - VLOG(1) << "Setting user is supervised to " << is_supervised; |
| - is_supervised_ = is_supervised; |
| +void RegularUser::SetIsChild(bool is_child) { |
| + VLOG(1) << "Setting user is child to " << is_child; |
| + is_child_ = is_child; |
| } |
| GuestUser::GuestUser() : User(chromeos::login::kGuestUserName) { |
| @@ -335,7 +335,7 @@ bool User::has_gaia_account() const { |
| COMPILE_ASSERT(user_manager::NUM_USER_TYPES == 7, num_user_types_unexpected); |
| switch (GetType()) { |
| case user_manager::USER_TYPE_REGULAR: |
| - case user_manager::USER_TYPE_REGULAR_SUPERVISED: |
| + case user_manager::USER_TYPE_CHILD: |
| return true; |
| case user_manager::USER_TYPE_GUEST: |
| case user_manager::USER_TYPE_RETAIL_MODE: |