Index: chrome/browser/profiles/profile_info_cache.cc |
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc |
index 3079a62d1774cb8f629f6c0eae271cc1ff30bba2..4e6803e2ceb57727fbdd9386df1918ab01c384ac 100644 |
--- a/chrome/browser/profiles/profile_info_cache.cc |
+++ b/chrome/browser/profiles/profile_info_cache.cc |
@@ -33,6 +33,10 @@ |
#include "ui/gfx/image/image.h" |
#include "ui/gfx/image/image_util.h" |
+#if defined(ENABLE_SUPERVISED_USERS) |
+#include "chrome/browser/supervised_user/supervised_user_constants.h" |
+#endif |
+ |
using content::BrowserThread; |
namespace { |
@@ -399,6 +403,19 @@ bool ProfileInfoCache::ProfileIsSupervisedAtIndex(size_t index) const { |
return !GetSupervisedUserIdOfProfileAtIndex(index).empty(); |
} |
+bool ProfileInfoCache::ProfileIsChildAtIndex(size_t index) const { |
+#if defined(ENABLE_SUPERVISED_USERS) |
+ return GetSupervisedUserIdOfProfileAtIndex(index) == |
+ supervised_users::kChildAccountSUID; |
+#else |
+ return false; |
+#endif |
+} |
+ |
+bool ProfileInfoCache::ProfileIsLegacySupervisedAtIndex(size_t index) const { |
+ return ProfileIsSupervisedAtIndex(index) && !ProfileIsChildAtIndex(index); |
+} |
+ |
bool ProfileInfoCache::IsOmittedProfileAtIndex(size_t index) const { |
bool value = false; |
GetInfoForProfileAtIndex(index)->GetBoolean(kIsOmittedFromProfileListKey, |