| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 class Time; | 12 class Time; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Image; | 16 class Image; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace user_manager { |
| 20 class UserID; |
| 21 } |
| 22 |
| 19 // This abstract interface is used to query the profiles backend for information | 23 // This abstract interface is used to query the profiles backend for information |
| 20 // about the different profiles. Its sole concrete implementation is the | 24 // about the different profiles. Its sole concrete implementation is the |
| 21 // ProfileInfoCache. This interface exists largely to assist in testing. | 25 // ProfileInfoCache. This interface exists largely to assist in testing. |
| 22 class ProfileInfoInterface { | 26 class ProfileInfoInterface { |
| 23 public: | 27 public: |
| 24 virtual size_t GetNumberOfProfiles() const = 0; | 28 virtual size_t GetNumberOfProfiles() const = 0; |
| 25 | 29 |
| 26 virtual size_t GetIndexOfProfileWithPath( | 30 virtual size_t GetIndexOfProfileWithPath( |
| 27 const base::FilePath& profile_path) const = 0; | 31 const base::FilePath& profile_path) const = 0; |
| 28 | 32 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 virtual bool ProfileIsSupervisedAtIndex(size_t index) const = 0; | 69 virtual bool ProfileIsSupervisedAtIndex(size_t index) const = 0; |
| 66 // Returns whether the profile is associated with a child account. | 70 // Returns whether the profile is associated with a child account. |
| 67 virtual bool ProfileIsChildAtIndex(size_t index) const = 0; | 71 virtual bool ProfileIsChildAtIndex(size_t index) const = 0; |
| 68 // Returns whether the profile is a legacy supervised user profile. | 72 // Returns whether the profile is a legacy supervised user profile. |
| 69 virtual bool ProfileIsLegacySupervisedAtIndex(size_t index) const = 0; | 73 virtual bool ProfileIsLegacySupervisedAtIndex(size_t index) const = 0; |
| 70 | 74 |
| 71 // Returns true if the profile should be omitted from the desktop profile | 75 // Returns true if the profile should be omitted from the desktop profile |
| 72 // list (see ProfileListDesktop), so it won't appear in the avatar menu. | 76 // list (see ProfileListDesktop), so it won't appear in the avatar menu. |
| 73 virtual bool IsOmittedProfileAtIndex(size_t index) const = 0; | 77 virtual bool IsOmittedProfileAtIndex(size_t index) const = 0; |
| 74 | 78 |
| 75 virtual std::string GetSupervisedUserIdOfProfileAtIndex( | 79 virtual user_manager::UserID GetSupervisedUserIdOfProfileAtIndex( |
| 76 size_t index) const = 0; | 80 size_t index) const = 0; |
| 77 | 81 |
| 78 // This profile is associated with an account but has been signed-out. | 82 // This profile is associated with an account but has been signed-out. |
| 79 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const = 0; | 83 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const = 0; |
| 80 | 84 |
| 81 // Profile is known to be ephemeral and should be deleted when closed. | 85 // Profile is known to be ephemeral and should be deleted when closed. |
| 82 virtual bool ProfileIsEphemeralAtIndex(size_t index) const = 0; | 86 virtual bool ProfileIsEphemeralAtIndex(size_t index) const = 0; |
| 83 | 87 |
| 84 // Returns true if the profile is using the name it was assigned by default | 88 // Returns true if the profile is using the name it was assigned by default |
| 85 // at creation (either the old-style "Lemonade" name, or the new "Profile %d" | 89 // at creation (either the old-style "Lemonade" name, or the new "Profile %d" |
| 86 // style name). | 90 // style name). |
| 87 virtual bool ProfileIsUsingDefaultNameAtIndex(size_t index) const = 0; | 91 virtual bool ProfileIsUsingDefaultNameAtIndex(size_t index) const = 0; |
| 88 | 92 |
| 89 // Returns true if the user has never manually selected a profile avatar. | 93 // Returns true if the user has never manually selected a profile avatar. |
| 90 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const = 0; | 94 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const = 0; |
| 91 | 95 |
| 92 // Returns true if the given profile is connected to an account. | 96 // Returns true if the given profile is connected to an account. |
| 93 virtual bool ProfileIsAuthenticatedAtIndex(size_t index) const = 0; | 97 virtual bool ProfileIsAuthenticatedAtIndex(size_t index) const = 0; |
| 94 | 98 |
| 95 protected: | 99 protected: |
| 96 virtual ~ProfileInfoInterface() {} | 100 virtual ~ProfileInfoInterface() {} |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 103 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| OLD | NEW |