[Code Health] Migrate extensions identity API to (Once|Repeating)Callback

This change migrates callbacks related to the extension identity API to
OnceCallback and RepeatingCallback. There should be no functional change.

Bug: 1007786
Change-Id: Iea32a2c1cc37bb0922ea1d7bfa7d610d425581c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288198
Auto-Submit: Clark DuVall <[email protected]>
Commit-Queue: Alex Ilin <[email protected]>
Reviewed-by: Alex Ilin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#786677}
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index e5e3eed..57ce9ff 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -122,7 +122,8 @@
   // Consent result.
   void SetConsentResult(const std::string& result,
                         const std::string& window_id);
-  std::unique_ptr<base::CallbackList<OnSetConsentResultSignature>::Subscription>
+  std::unique_ptr<
+      base::RepeatingCallbackList<OnSetConsentResultSignature>::Subscription>
   RegisterOnSetConsentResultCallback(
       const base::RepeatingCallback<OnSetConsentResultSignature>& callback);
 
@@ -130,8 +131,8 @@
   void Shutdown() override;
   static BrowserContextKeyedAPIFactory<IdentityAPI>* GetFactoryInstance();
 
-  std::unique_ptr<base::CallbackList<void()>::Subscription>
-  RegisterOnShutdownCallback(const base::Closure& cb);
+  std::unique_ptr<base::OnceCallbackList<void()>::Subscription>
+  RegisterOnShutdownCallback(base::OnceClosure cb);
 
   // Callback that is used in testing contexts to test the implementation of
   // the chrome.identity.onSignInChanged event. Note that the passed-in Event is
@@ -183,9 +184,9 @@
 
   OnSignInChangedCallback on_signin_changed_callback_for_testing_;
 
-  base::CallbackList<OnSetConsentResultSignature>
+  base::RepeatingCallbackList<OnSetConsentResultSignature>
       on_set_consent_result_callback_list_;
-  base::CallbackList<void()> on_shutdown_callback_list_;
+  base::OnceCallbackList<void()> on_shutdown_callback_list_;
 };
 
 template <>