Chromium Code Reviews| Index: components/user_manager/user.cc |
| diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc |
| index 575d07f589c7f4e84742d3660e3c3c58914f4117..139f550ada3b1583e12541a2662423753b549430 100644 |
| --- a/components/user_manager/user.cc |
| +++ b/components/user_manager/user.cc |
| @@ -28,6 +28,14 @@ std::string GetUserName(const std::string& email) { |
| } // namespace |
| +bool User::IsSupervised() const { |
| + return false; |
| +} |
| + |
| +void User::SetIsSupervised(bool is_supervised) { |
| + VLOG(1) << "Setting user is supervised to " << is_supervised; |
|
Marc Treib
2014/09/15 08:20:51
I just noticed: I think this should say something
merkulova
2014/09/18 08:51:29
Done.
|
| +} |
| + |
| class RegularUser : public User { |
| public: |
| explicit RegularUser(const std::string& email); |
| @@ -36,8 +44,17 @@ class RegularUser : public User { |
| // Overridden from User: |
| virtual UserType GetType() const OVERRIDE; |
| virtual bool CanSyncImage() const OVERRIDE; |
| + virtual void SetIsSupervised(bool is_supervised) OVERRIDE { |
| + VLOG(1) << "Setting user is supervised to " << is_supervised; |
| + is_supervised_ = is_supervised; |
| + } |
| + virtual bool IsSupervised() const OVERRIDE { |
| + return is_supervised_; |
| + } |
| private: |
| + bool is_supervised_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(RegularUser); |
| }; |
| @@ -72,6 +89,7 @@ class SupervisedUser : public User { |
| // Overridden from User: |
| virtual UserType GetType() const OVERRIDE; |
| + virtual bool IsSupervised() const OVERRIDE; |
| virtual std::string display_email() const OVERRIDE; |
| private: |
| @@ -278,6 +296,10 @@ std::string SupervisedUser::display_email() const { |
| return base::UTF16ToUTF8(display_name()); |
| } |
| +bool SupervisedUser::IsSupervised() const { |
| + return true; |
| +} |
| + |
| RetailModeUser::RetailModeUser() : User(chromeos::login::kRetailModeUserName) { |
| set_display_email(std::string()); |
| } |