Migrate to std::string_view in components/reporting.
This change migrates all uses of base::StringPiece to std::string_view
in components/reporting. This is a cleanup change since
base::StringPiece is just an alias of std::string_view due to
https://crrev.com/c/4294483.
Change-Id: Iad61ebe7324dc624768eee67c14c35d64b6ec66d
Bug: b:291657680
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4691033
Commit-Queue: Josh Hilke <[email protected]>
Reviewed-by: Hong Xu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1171840}
diff --git a/components/reporting/encryption/primitives.cc b/components/reporting/encryption/primitives.cc
index 5ca955a..a0e86c8 100644
--- a/components/reporting/encryption/primitives.cc
+++ b/components/reporting/encryption/primitives.cc
@@ -66,7 +66,7 @@
}
bool PerformSymmetricEncryption(const uint8_t symmetric_key[kKeySize],
- base::StringPiece input_data,
+ std::string_view input_data,
std::string* output_data) {
// Make sure OpenSSL is initialized, in order to avoid data races later.
crypto::EnsureOpenSSLInit();
@@ -95,7 +95,7 @@
}
bool VerifySignature(const uint8_t verification_key[kKeySize],
- base::StringPiece message,
+ std::string_view message,
const uint8_t signature[kSignatureSize]) {
// Make sure OpenSSL is initialized, in order to avoid data races later.
crypto::EnsureOpenSSLInit();