Commit c2f5b2df authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

Update avatar toolbar button when account is removed

Update the icon of the avatar toolbar button when
an account is signed out.
This happens for instance when the user selects cancel
on the sync-confirmation dialog.

Bug: 870656
Change-Id: Id557500c02ef2ac10d704cde75a9afe9db5e7655
Reviewed-on: https://chromium-review.googlesource.com/1185195Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585148}
parent bcc387a5
......@@ -176,6 +176,10 @@ void AvatarToolbarButton::OnAccountImageUpdated(const std::string& account_id,
UpdateIcon();
}
void AvatarToolbarButton::OnAccountRemoved(const AccountInfo& info) {
UpdateIcon();
}
bool AvatarToolbarButton::IsIncognito() const {
return profile_->IsOffTheRecord() && !profile_->IsGuestSession();
}
......
......@@ -60,6 +60,7 @@ class AvatarToolbarButton : public ToolbarButton,
// Needed if the first sync promo account should be displayed.
void OnAccountImageUpdated(const std::string& account_id,
const gfx::Image& image) override;
void OnAccountRemoved(const AccountInfo& info) override;
bool IsIncognito() const;
bool ShouldShowGenericIcon() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment