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 c2e414899c4036c0cd094f7e5b924abc8dda16ab..1c50724c58e87802df0d7b9fe90dd0ef43f91f6b 100644 |
--- a/chrome/browser/profiles/profile_info_cache.cc |
+++ b/chrome/browser/profiles/profile_info_cache.cc |
@@ -166,6 +166,12 @@ ProfileInfoCache::ProfileInfoCache(PrefService* prefs, |
if (!info->HasKey(kIsUsingDefaultAvatarKey)) { |
info->SetBoolean(kIsUsingDefaultAvatarKey, using_default_name); |
} |
+ |
+ std::string supervised_user_id; |
+ if (info->GetString(kSupervisedUserId, &supervised_user_id) && |
+ !supervised_user_id.empty()) { |
+ prefs_->SetBoolean(prefs::kSupervisedUserExistsOrExisted, true); |
+ } |
} |
// If needed, start downloading the high-res avatars and migrate any legacy |
@@ -200,6 +206,8 @@ void ProfileInfoCache::AddProfileToCache( |
// Default value for whether background apps are running is false. |
info->SetBoolean(kBackgroundAppsKey, false); |
info->SetString(kSupervisedUserId, supervised_user_id); |
+ if (!supervised_user_id.empty()) |
+ prefs_->SetBoolean(prefs::kSupervisedUserExistsOrExisted, true); |
info->SetBoolean(kIsOmittedFromProfileListKey, !supervised_user_id.empty()); |
info->SetBoolean(kProfileIsEphemeral, false); |
info->SetBoolean(kIsUsingDefaultNameKey, IsDefaultProfileName(name)); |
@@ -550,6 +558,9 @@ void ProfileInfoCache::SetSupervisedUserIdOfProfileAtIndex( |
// This takes ownership of |info|. |
SetInfoForProfileAtIndex(index, info.release()); |
+ if (!id.empty()) |
+ prefs_->SetBoolean(prefs::kSupervisedUserExistsOrExisted, true); |
+ |
base::FilePath profile_path = GetPathOfProfileAtIndex(index); |
FOR_EACH_OBSERVER(ProfileInfoCacheObserver, |
observer_list_, |