Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: components/proximity_auth/cryptauth/fake_secure_message_delegate.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/cryptauth/fake_secure_message_delegate.cc
diff --git a/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc b/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc
index d05361c2d1ae50e65bbfcae06519a9974759d82b..4251e1991b06d9b2e255125c5adf8eae6e701e0e 100644
--- a/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc
+++ b/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc
@@ -76,7 +76,8 @@ bool Verify(const std::string& signature,
signing_key = key;
} else {
std::string prefix = kPrivateKeyPrefix;
- bool is_private_key = base::StartsWithASCII(key, prefix, true);
+ bool is_private_key =
+ base::StartsWith(key, prefix, base::CompareCase::SENSITIVE);
signing_key = is_private_key ? key.substr(prefix.size()) : prefix + key;
}
@@ -113,7 +114,7 @@ void FakeSecureMessageDelegate::DeriveKey(const std::string& private_key,
// private key so it is equal to its corresponding public key.
std::string prefix(kPrivateKeyPrefix);
std::string normalized_private_key =
- base::StartsWithASCII(private_key, prefix, true)
+ base::StartsWith(private_key, prefix, base::CompareCase::SENSITIVE)
? private_key.substr(prefix.size())
: private_key;
« no previous file with comments | « components/password_manager/core/browser/password_form_manager.cc ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698