Migrate //crypto from base::Callback to base::OnceCallback
This updates //crypto to use base::OnceCallback instead of legacy
base::Callback. No intended functional change is included.
This reduces the number of 'base::Bind' in //crypto from 3 to 0,
as tracked at http://goo.gl/LUVhDj
Bug: 714018
Change-Id: I020993c154a0706a262543937d9ebe506ea01c25
Reviewed-on: https://chromium-review.googlesource.com/952507
Reviewed-by: Adam Langley <agl@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542030}
diff --git a/crypto/nss_util_internal.h b/crypto/nss_util_internal.h
index 080ac10..5fd40811 100644
--- a/crypto/nss_util_internal.h
+++ b/crypto/nss_util_internal.h
@@ -53,7 +53,7 @@
// loaded and |callback| is non-null, the |callback| will be run once the slot
// is loaded.
CRYPTO_EXPORT ScopedPK11Slot GetSystemNSSKeySlot(
- const base::Callback<void(ScopedPK11Slot)>& callback) WARN_UNUSED_RESULT;
+ base::OnceCallback<void(ScopedPK11Slot)> callback) WARN_UNUSED_RESULT;
// Sets the test system slot to |slot|, which means that |slot| will be exposed
// through |GetSystemNSSKeySlot| and |IsTPMTokenReady| will return true.
@@ -102,7 +102,7 @@
// is loaded.
CRYPTO_EXPORT ScopedPK11Slot GetPrivateSlotForChromeOSUser(
const std::string& username_hash,
- const base::Callback<void(ScopedPK11Slot)>& callback) WARN_UNUSED_RESULT;
+ base::OnceCallback<void(ScopedPK11Slot)> callback) WARN_UNUSED_RESULT;
// Closes the NSS DB for |username_hash| that was previously opened by the
// *Initialize*ForChromeOSUser functions.