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

Convert c/b/password_manager/ to OnPrimaryAccountChanged()

Methods OnPrimaryAccountSet/Cleared() are deprecated, so this CL changes
the chrome/browser/password_manager/* to override the method
OnPrimaryAccountChanged().

Bug: 1163126
Change-Id: I1357bc6a398089f71ba72363a0b2f24e4a7c7c9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611084
Auto-Submit: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841473}
parent 8d89ce86
...@@ -141,14 +141,16 @@ void GeneratedPasswordLeakDetectionPref::IdentityManagerShutdown( ...@@ -141,14 +141,16 @@ void GeneratedPasswordLeakDetectionPref::IdentityManagerShutdown(
identity_manager_observer_.RemoveAll(); identity_manager_observer_.RemoveAll();
} }
void GeneratedPasswordLeakDetectionPref::OnPrimaryAccountSet( void GeneratedPasswordLeakDetectionPref::OnPrimaryAccountChanged(
const CoreAccountInfo& primary_account_info) { const signin::PrimaryAccountChangeEvent& event_details) {
NotifyObservers(kGeneratedPasswordLeakDetectionPref); switch (event_details.GetEventTypeFor(signin::ConsentLevel::kSync)) {
} case signin::PrimaryAccountChangeEvent::Type::kSet:
case signin::PrimaryAccountChangeEvent::Type::kCleared:
void GeneratedPasswordLeakDetectionPref::OnPrimaryAccountCleared( NotifyObservers(kGeneratedPasswordLeakDetectionPref);
const CoreAccountInfo& previous_primary_account_info) { break;
NotifyObservers(kGeneratedPasswordLeakDetectionPref); case signin::PrimaryAccountChangeEvent::Type::kNone:
break;
}
} }
void GeneratedPasswordLeakDetectionPref::OnExtendedAccountInfoUpdated( void GeneratedPasswordLeakDetectionPref::OnExtendedAccountInfoUpdated(
......
...@@ -39,10 +39,8 @@ class GeneratedPasswordLeakDetectionPref ...@@ -39,10 +39,8 @@ class GeneratedPasswordLeakDetectionPref
void OnSourcePreferencesChanged(); void OnSourcePreferencesChanged();
// IdentityManager::Observer implementation. // IdentityManager::Observer implementation.
void OnPrimaryAccountSet( void OnPrimaryAccountChanged(
const CoreAccountInfo& primary_account_info) override; const signin::PrimaryAccountChangeEvent& event_details) override;
void OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) override;
void OnExtendedAccountInfoUpdated(const AccountInfo& info) override; void OnExtendedAccountInfoUpdated(const AccountInfo& info) override;
void OnExtendedAccountInfoRemoved(const AccountInfo& info) override; void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
......
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