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 4e6803e2ceb57727fbdd9386df1918ab01c384ac..6ba81df7bdac7f6a9da76a3472bf7534d776169b 100644 |
--- a/chrome/browser/profiles/profile_info_cache.cc |
+++ b/chrome/browser/profiles/profile_info_cache.cc |
@@ -58,6 +58,7 @@ const char kSigninRequiredKey[] = "signin_required"; |
const char kSupervisedUserId[] = "managed_user_id"; |
const char kProfileIsEphemeral[] = "is_ephemeral"; |
const char kActiveTimeKey[] = "active_time"; |
+const char kIsAuthErrorKey[] = "is_auth_error"; |
// First eight are generic icons, which use IDS_NUMBERED_PROFILE_NAME. |
const int kDefaultNames[] = { |
@@ -455,6 +456,12 @@ bool ProfileInfoCache::ProfileIsUsingDefaultAvatarAtIndex(size_t index) const { |
return value; |
} |
+bool ProfileInfoCache::ProfileIsAuthErrorAtIndex(size_t index) const { |
+ bool value = false; |
+ GetInfoForProfileAtIndex(index)->GetBoolean(kIsAuthErrorKey, &value); |
+ return value; |
+} |
+ |
size_t ProfileInfoCache::GetAvatarIconIndexOfProfileAtIndex(size_t index) |
const { |
std::string icon_url; |
@@ -752,6 +759,17 @@ void ProfileInfoCache::SetProfileIsUsingDefaultAvatarAtIndex( |
SetInfoForProfileAtIndex(index, info.release()); |
} |
+void ProfileInfoCache::SetProfileIsAuthErrorAtIndex(size_t index, bool value) { |
+ if (value == ProfileIsAuthErrorAtIndex(index)) |
+ return; |
+ |
+ scoped_ptr<base::DictionaryValue> info( |
+ GetInfoForProfileAtIndex(index)->DeepCopy()); |
+ info->SetBoolean(kIsAuthErrorKey, value); |
+ // This takes ownership of |info|. |
+ SetInfoForProfileAtIndex(index, info.release()); |
+} |
+ |
bool ProfileInfoCache::IsDefaultProfileName(const base::string16& name) const { |
// Check if it's a "First user" old-style name. |
if (name == l10n_util::GetStringUTF16(IDS_DEFAULT_PROFILE_NAME) || |