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( ...@@ -327,10 +327,12 @@ void AvatarToolbarButtonDelegate::OnProfileNameChanged(
avatar_toolbar_button_->UpdateText(); avatar_toolbar_button_->UpdateText();
} }
void AvatarToolbarButtonDelegate::OnUnconsentedPrimaryAccountChanged( void AvatarToolbarButtonDelegate::OnPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) { const signin::PrimaryAccountChangeEvent& event) {
if (unconsented_primary_account_info.IsEmpty()) if (event.GetEventTypeFor(signin::ConsentLevel::kNotRequired) !=
signin::PrimaryAccountChangeEvent::Type::kSet) {
return; return;
}
OnUserIdentityChanged(); OnUserIdentityChanged();
} }
......
...@@ -80,8 +80,8 @@ class AvatarToolbarButtonDelegate : public BrowserListObserver, ...@@ -80,8 +80,8 @@ class AvatarToolbarButtonDelegate : public BrowserListObserver,
// IdentityManager::Observer: // IdentityManager::Observer:
// Needed if the first sync promo account should be displayed. // Needed if the first sync promo account should be displayed.
void OnUnconsentedPrimaryAccountChanged( void OnPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override; const signin::PrimaryAccountChangeEvent& event) override;
void OnRefreshTokensLoaded() override; void OnRefreshTokensLoaded() override;
void OnAccountsInCookieUpdated( void OnAccountsInCookieUpdated(
const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info, const signin::AccountsInCookieJarInfo& accounts_in_cookie_jar_info,
......
...@@ -96,8 +96,8 @@ class UnconsentedPrimaryAccountChecker ...@@ -96,8 +96,8 @@ class UnconsentedPrimaryAccountChecker
} }
// signin::IdentityManager::Observer overrides: // signin::IdentityManager::Observer overrides:
void OnUnconsentedPrimaryAccountChanged( void OnPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override { const signin::PrimaryAccountChangeEvent& event) override {
CheckExitCondition(); 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