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

Convert components/sync/driver/* to OnPrimaryAccountChanged()

Method OnUnconsentedPrimaryAccountChanged is deprecated. So this cl
changes these calls to OnPrimaryAccountChanged().

Bug: 1158855
Change-Id: I9c2e83df1149747b284358888b6b54f9d8253c08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622374Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842146}
parent db7df188
...@@ -281,16 +281,11 @@ void SyncAuthManager::ConnectionClosed() { ...@@ -281,16 +281,11 @@ void SyncAuthManager::ConnectionClosed() {
void SyncAuthManager::OnPrimaryAccountChanged( void SyncAuthManager::OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) { const signin::PrimaryAccountChangeEvent& event) {
switch (event.GetEventTypeFor(signin::ConsentLevel::kSync)) { if (event.GetEventTypeFor(signin::ConsentLevel::kSync) ==
case signin::PrimaryAccountChangeEvent::Type::kCleared: signin::PrimaryAccountChangeEvent::Type::kCleared) {
UMA_HISTOGRAM_ENUMERATION("Sync.StopSource", SIGN_OUT, STOP_SOURCE_LIMIT); UMA_HISTOGRAM_ENUMERATION("Sync.StopSource", SIGN_OUT, STOP_SOURCE_LIMIT);
FALLTHROUGH;
case signin::PrimaryAccountChangeEvent::Type::kSet:
UpdateSyncAccountIfNecessary();
break;
case signin::PrimaryAccountChangeEvent::Type::kNone:
break;
} }
UpdateSyncAccountIfNecessary();
} }
void SyncAuthManager::OnRefreshTokenUpdatedForAccount( void SyncAuthManager::OnRefreshTokenUpdatedForAccount(
...@@ -404,11 +399,6 @@ void SyncAuthManager::OnRefreshTokensLoaded() { ...@@ -404,11 +399,6 @@ void SyncAuthManager::OnRefreshTokensLoaded() {
} }
} }
void SyncAuthManager::OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) {
UpdateSyncAccountIfNecessary();
}
bool SyncAuthManager::IsRetryingAccessTokenFetchForTest() const { bool SyncAuthManager::IsRetryingAccessTokenFetchForTest() const {
return request_access_token_retry_timer_.IsRunning(); return request_access_token_retry_timer_.IsRunning();
} }
......
...@@ -112,8 +112,6 @@ class SyncAuthManager : public signin::IdentityManager::Observer { ...@@ -112,8 +112,6 @@ class SyncAuthManager : public signin::IdentityManager::Observer {
void OnRefreshTokenRemovedForAccount( void OnRefreshTokenRemovedForAccount(
const CoreAccountId& account_id) override; const CoreAccountId& account_id) override;
void OnRefreshTokensLoaded() override; void OnRefreshTokensLoaded() override;
void OnUnconsentedPrimaryAccountChanged(
const CoreAccountInfo& unconsented_primary_account_info) override;
// Test-only methods for inspecting/modifying internal state. // Test-only methods for inspecting/modifying internal state.
bool IsRetryingAccessTokenFetchForTest() const; bool IsRetryingAccessTokenFetchForTest() 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