Commit eeb45c9b authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Chromium LUCI CQ

Convert c/b/ui/views/profiles/ to OnPrimaryAccountChanged()

Methods OnUnconsentedPrimaryAccountChanged is deprecated, so this CL
changes the chrome/browser/ui/views/profiles/* to override the method
OnPrimaryAccountChanged().

Bug: 1163126
Change-Id: Ia0168bae3070c7c5eefd9919598919b9d0ae4e0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611711Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840654}
parent 8623c649
......@@ -327,10 +327,12 @@ void AvatarToolbarButtonDelegate::OnProfileNameChanged(
avatar_toolbar_button_->UpdateText();
}
void AvatarToolbarButtonDelegate::OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) {
if (unconsented_primary_account_info.IsEmpty())
void AvatarToolbarButtonDelegate::OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) {
if (event.GetEventTypeFor(signin::ConsentLevel::kNotRequired) !=
signin::PrimaryAccountChangeEvent::Type::kSet) {
return;
}
OnUserIdentityChanged();
}
......
......@@ -80,8 +80,8 @@ class AvatarToolbarButtonDelegate : public BrowserListObserver,
// IdentityManager::Observer:
// Needed if the first sync promo account should be displayed.
void OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override;
void OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) override;
void OnRefreshTokensLoaded() override;
void OnAccountsInCookieUpdated(
const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info,
......
......@@ -96,8 +96,8 @@ class UnconsentedPrimaryAccountChecker
}
// signin::IdentityManager::Observer overrides:
void OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override {
void OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) override {
CheckExitCondition();
}
......
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