| Index: components/user_manager/user.cc
|
| diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc
|
| index 2fbd910e923e0957998908402ac924dec86da170..2ec648a54ecc8d73b7ea06cde1f7aab1f4e58eae 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,11 +134,11 @@ 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;
|
| - if (is_supervised) {
|
| - NOTREACHED() << "Calling SetIsSupervised(true) for base User class. "
|
| - << "Base class cannot be set as supervised";
|
| +void User::SetIsChild(bool is_child) {
|
| + VLOG(1) << "Ignoring SetIsChild call with param " << is_child;
|
| + if (is_child) {
|
| + NOTREACHED() << "Calling SetIsChild(true) for base User class."
|
| + << "Base class cannot be set as child";
|
| }
|
| }
|
|
|
| @@ -149,7 +149,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 {
|
| @@ -253,7 +253,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);
|
| }
|
| @@ -262,17 +262,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) {
|
| @@ -338,7 +338,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:
|
|
|