Fix case when showing promo account in avatar button
The condition of whether a user changed their profile
avatar explicitly is changed.
Bug: 853363
Change-Id: I1e9bc3928b74f3dbb613521b492561455a7b104b
Reviewed-on: https://chromium-review.googlesource.com/1120065
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571903}
diff --git a/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc b/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
index bbf090e..a5a4bcd 100644
--- a/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
+++ b/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
@@ -267,7 +267,7 @@
// If the user isn't signed in and the profile icon wasn't changed explicitly,
// try to use the first account icon of the sync promo.
if (!SigninManagerFactory::GetForProfile(profile_)->IsAuthenticated() &&
- entry->GetAvatarIconIndex() == 0) {
+ entry->IsUsingDefaultAvatar()) {
std::vector<AccountInfo> promo_accounts =
signin_ui_util::GetAccountsForDicePromos(profile_);
if (!promo_accounts.empty()) {