Commit 501cde7e authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Chromium LUCI CQ

Convert components/sync/trusted_vault/* to OnPrimaryAccountChanged

Method OnPrimaryAccountSet/Cleared and
OnUnconsentedPrimaryAccountChanged is deprecated. So this cl changes
these calls to OnPrimaryAccountChanged.

Bug: 1158855
Change-Id: I0d19f0dad84f128c554ace6942d4ec4e5e96e34b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611740
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841446}
parent af72fec4
......@@ -54,12 +54,8 @@ class PrimaryAccountObserver : public signin::IdentityManager::Observer {
~PrimaryAccountObserver() override;
// signin::IdentityManager::Observer implementation.
void OnPrimaryAccountSet(
const CoreAccountInfo& primary_account_info) override;
void OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) override;
void OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override;
void OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) override;
private:
void UpdatePrimaryAccountIfNeeded();
......@@ -89,18 +85,8 @@ PrimaryAccountObserver::~PrimaryAccountObserver() {
identity_manager_->RemoveObserver(this);
}
void PrimaryAccountObserver::OnPrimaryAccountSet(
const CoreAccountInfo& primary_account_info) {
UpdatePrimaryAccountIfNeeded();
}
void PrimaryAccountObserver::OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) {
UpdatePrimaryAccountIfNeeded();
}
void PrimaryAccountObserver::OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) {
void PrimaryAccountObserver::OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) {
UpdatePrimaryAccountIfNeeded();
}
......
......@@ -50,18 +50,8 @@ void TrustedVaultAccessTokenFetcherFrontend::FetchAccessToken(
}
}
void TrustedVaultAccessTokenFetcherFrontend::OnPrimaryAccountSet(
const CoreAccountInfo& primary_account_info) {
UpdatePrimaryAccountIfNeeded();
}
void TrustedVaultAccessTokenFetcherFrontend::OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) {
UpdatePrimaryAccountIfNeeded();
}
void TrustedVaultAccessTokenFetcherFrontend::OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) {
void TrustedVaultAccessTokenFetcherFrontend::OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) {
UpdatePrimaryAccountIfNeeded();
}
......
......@@ -46,12 +46,8 @@ class TrustedVaultAccessTokenFetcherFrontend
TrustedVaultAccessTokenFetcher::TokenCallback callback);
// signin::IdentityManager::Observer implementation.
void OnPrimaryAccountSet(
const CoreAccountInfo& primary_account_info) override;
void OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) override;
void OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override;
void OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) override;
private:
// Updates |primary_account_| and runs |pending_requests_| in case
......
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