s13n: Rename IdentityManager::Observer::OnAccountRemovedWithInfo

This method will be invoked just before the extended information about
an account is removed. It would be good to be renamed to reflect that the
extended information is still available and is passed to the method.

Bug: 930122
Change-Id: I95c0a837e42c056288d777ba8bf3c916133b2a52
Reviewed-on: https://chromium-review.googlesource.com/c/1460745
Reviewed-by: Gyuyoung Kim <[email protected]>
Reviewed-by: Sylvain Defresne <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: Gyuyoung Kim <[email protected]>
Cr-Commit-Position: refs/heads/master@{#631041}
diff --git a/chrome/browser/chromeos/arc/auth/arc_auth_service.cc b/chrome/browser/chromeos/arc/auth/arc_auth_service.cc
index 92965882..ee8bc92 100644
--- a/chrome/browser/chromeos/arc/auth/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/auth/arc_auth_service.cc
@@ -524,7 +524,8 @@
   // notifications. See crbug.com/904978.
 }
 
-void ArcAuthService::OnAccountRemovedWithInfo(const AccountInfo& account_info) {
+void ArcAuthService::OnExtendedAccountInfoRemoved(
+    const AccountInfo& account_info) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   if (!chromeos::switches::IsAccountManagerEnabled())
diff --git a/chrome/browser/chromeos/arc/auth/arc_auth_service.h b/chrome/browser/chromeos/arc/auth/arc_auth_service.h
index c264f52..92f6599 100644
--- a/chrome/browser/chromeos/arc/auth/arc_auth_service.h
+++ b/chrome/browser/chromeos/arc/auth/arc_auth_service.h
@@ -102,7 +102,7 @@
       const chromeos::AccountManager::AccountKey& account_key) override;
 
   // IdentityManager::Observer:
-  void OnAccountRemovedWithInfo(const AccountInfo& account_info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& account_info) override;
 
   // ArcSessionManager::Observer:
   void OnArcInitialStart() override;
diff --git a/chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc b/chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc
index c9b7560..df078ee1 100644
--- a/chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc
+++ b/chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc
@@ -635,8 +635,8 @@
 
   AccountFetcherService* account_fetcher_service =
       AccountFetcherServiceFactory::GetForProfile(profile());
-  // Necessary to ensure that the OnAccountRemovedWithInfo() observer will be
-  // sent.
+  // Necessary to ensure that the OnExtendedAccountInfoRemoved() observer will
+  // be sent.
   account_fetcher_service->EnableNetworkFetchesForTest();
   identity_manager->GetAccountsMutator()->RemoveAccount(
       maybe_account_info.value().account_id,
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc
index ce217762..49dbcec 100644
--- a/chrome/browser/extensions/api/identity/identity_api.cc
+++ b/chrome/browser/extensions/api/identity/identity_api.cc
@@ -175,7 +175,8 @@
   FireOnAccountSignInChanged(account_info.gaia, true);
 }
 
-void IdentityAPI::OnAccountRemovedWithInfo(const AccountInfo& account_info) {
+void IdentityAPI::OnExtendedAccountInfoRemoved(
+    const AccountInfo& account_info) {
   DCHECK(!account_info.gaia.empty());
   FireOnAccountSignInChanged(account_info.gaia, false);
 }
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index 6f7f860..057a33f3 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -134,7 +134,7 @@
   // NOTE: This class must listen for this callback rather than
   // OnRefreshTokenRemovedForAccount() to obtain the Gaia ID of the removed
   // account.
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 
   // Fires the chrome.identity.onSignInChanged event.
   void FireOnAccountSignInChanged(const std::string& gaia_id,
diff --git a/chrome/browser/password_manager/password_store_signin_notifier_impl.cc b/chrome/browser/password_manager/password_store_signin_notifier_impl.cc
index 5a4027c..64dab721 100644
--- a/chrome/browser/password_manager/password_store_signin_notifier_impl.cc
+++ b/chrome/browser/password_manager/password_store_signin_notifier_impl.cc
@@ -34,7 +34,7 @@
 }
 
 // IdentityManager::Observer implementations.
-void PasswordStoreSigninNotifierImpl::OnAccountRemovedWithInfo(
+void PasswordStoreSigninNotifierImpl::OnExtendedAccountInfoRemoved(
     const AccountInfo& info) {
   // Only reacts to content area (non-primary) Gaia account sign-out event.
   if (info.account_id !=
diff --git a/chrome/browser/password_manager/password_store_signin_notifier_impl.h b/chrome/browser/password_manager/password_store_signin_notifier_impl.h
index c3ea13f..866755ef 100644
--- a/chrome/browser/password_manager/password_store_signin_notifier_impl.h
+++ b/chrome/browser/password_manager/password_store_signin_notifier_impl.h
@@ -29,7 +29,7 @@
 
   // IdentityManager::Observer implementations.
   void OnPrimaryAccountCleared(const CoreAccountInfo& account_info) override;
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 
  private:
   Profile* const profile_;
diff --git a/chrome/browser/safe_browsing/advanced_protection_status_manager.cc b/chrome/browser/safe_browsing/advanced_protection_status_manager.cc
index 25b269c9..edb65f01 100644
--- a/chrome/browser/safe_browsing/advanced_protection_status_manager.cc
+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager.cc
@@ -113,7 +113,7 @@
   }
 }
 
-void AdvancedProtectionStatusManager::OnAccountRemovedWithInfo(
+void AdvancedProtectionStatusManager::OnExtendedAccountInfoRemoved(
     const AccountInfo& info) {
   if (profile_->IsOffTheRecord())
     return;
diff --git a/chrome/browser/safe_browsing/advanced_protection_status_manager.h b/chrome/browser/safe_browsing/advanced_protection_status_manager.h
index bfc9c7c..2a3af519 100644
--- a/chrome/browser/safe_browsing/advanced_protection_status_manager.h
+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager.h
@@ -85,7 +85,7 @@
   void OnPrimaryAccountSet(const CoreAccountInfo& account_info) override;
   void OnPrimaryAccountCleared(const CoreAccountInfo& account_info) override;
   void OnAccountUpdated(const AccountInfo& info) override;
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 
   void OnAdvancedProtectionEnabled();
 
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.cc b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
index 323d2177..38f734a 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.cc
@@ -265,7 +265,8 @@
   SetIsChildAccount(info.is_child_account);
 }
 
-void ChildAccountService::OnAccountRemovedWithInfo(const AccountInfo& info) {
+void ChildAccountService::OnExtendedAccountInfoRemoved(
+    const AccountInfo& info) {
   SetIsChildAccount(false);
 }
 
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.h b/chrome/browser/supervised_user/child_accounts/child_account_service.h
index 89c0bb9..9df68ad7 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.h
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.h
@@ -80,7 +80,7 @@
 
   // identity::IdentityManager::Observer implementation.
   void OnAccountUpdated(const AccountInfo& info) override;
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 
   // FamilyInfoFetcher::Consumer implementation.
   void OnGetFamilyMembersSuccess(
diff --git a/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc b/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
index d4a1199b..51e85db 100644
--- a/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
+++ b/chrome/browser/ui/views/profiles/avatar_toolbar_button.cc
@@ -239,7 +239,8 @@
   UpdateIcon();
 }
 
-void AvatarToolbarButton::OnAccountRemovedWithInfo(const AccountInfo& info) {
+void AvatarToolbarButton::OnExtendedAccountInfoRemoved(
+    const AccountInfo& info) {
   UpdateIcon();
 }
 
diff --git a/chrome/browser/ui/views/profiles/avatar_toolbar_button.h b/chrome/browser/ui/views/profiles/avatar_toolbar_button.h
index 80bdd67..bbee87d 100644
--- a/chrome/browser/ui/views/profiles/avatar_toolbar_button.h
+++ b/chrome/browser/ui/views/profiles/avatar_toolbar_button.h
@@ -66,7 +66,7 @@
       const identity::AccountsInCookieJarInfo& accounts_in_cookie_jar_info,
       const GoogleServiceAuthError& error) override;
   void OnAccountUpdated(const AccountInfo& info) override;
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 
   // ui::MaterialDesignControllerObserver:
   void OnTouchUiChanged() override;
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 711b5dbb..540091f 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -467,7 +467,7 @@
   FireWebUIListener("stored-accounts-updated", GetStoredAccountsList());
 }
 
-void PeopleHandler::OnAccountRemovedWithInfo(const AccountInfo& info) {
+void PeopleHandler::OnExtendedAccountInfoRemoved(const AccountInfo& info) {
   FireWebUIListener("stored-accounts-updated", GetStoredAccountsList());
 }
 
diff --git a/chrome/browser/ui/webui/settings/people_handler.h b/chrome/browser/ui/webui/settings/people_handler.h
index 1708043..b159e6a4 100644
--- a/chrome/browser/ui/webui/settings/people_handler.h
+++ b/chrome/browser/ui/webui/settings/people_handler.h
@@ -132,7 +132,7 @@
       const CoreAccountInfo& previous_primary_account_info) override;
 #if BUILDFLAG(ENABLE_DICE_SUPPORT)
   void OnAccountUpdated(const AccountInfo& info) override;
-  void OnAccountRemovedWithInfo(const AccountInfo& info) override;
+  void OnExtendedAccountInfoRemoved(const AccountInfo& info) override;
 #endif
 
   // syncer::SyncServiceObserver implementation.