diff options
author | brettw <brettw@chromium.org> | 2015-07-16 16:57:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-16 23:58:34 +0000 |
commit | 955093110ad64d5ec6f5426991efaa4a680b5d6f (patch) | |
tree | 19368cdb8861595640715e1072789959729efc2d /components/proximity_auth | |
parent | 387e05a79c7ae346ba7db36977ddfca7ca6f10a3 (diff) | |
download | chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.zip chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.gz chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.bz2 |
Remove legacy StartsWithASCII function.
This replaces it with base::StartsWith and the appropriate case flag. Since the existing version only ever did case-insensitive tests in ASCII, there should be no behavior change.
BUG=506255
TBR=jam
Review URL: https://codereview.chromium.org/1242023005
Cr-Commit-Position: refs/heads/master@{#339175}
Diffstat (limited to 'components/proximity_auth')
-rw-r--r-- | components/proximity_auth/cryptauth/fake_secure_message_delegate.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc b/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc index d05361c..4251e19 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; |