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

Unified Diff: net/quic/test_tools/crypto_test_utils.cc

Issue 1878083002: Implement IsAsciiUpper and IsAsciiLower in base/strings/string_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git sync Created 4 years, 8 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: net/quic/test_tools/crypto_test_utils.cc
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 29232949bc6438f8e0bbbe1ad3b3f842e1678119..bae41affb949c63a27f1bd26663ae8ce6d473c28 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -4,6 +4,7 @@
#include "net/quic/test_tools/crypto_test_utils.h"
+#include "base/strings/string_util.h"
#include "net/quic/crypto/channel_id.h"
#include "net/quic/crypto/common_cert_set.h"
#include "net/quic/crypto/crypto_handshake.h"
@@ -56,7 +57,7 @@ class CryptoFramerVisitor : public CryptoFramerVisitorInterface {
// HexChar parses |c| as a hex character. If valid, it sets |*value| to the
// value of the hex character and returns true. Otherwise it returns false.
bool HexChar(char c, uint8_t* value) {
brettw 2016/04/12 21:41:07 Optional: this whole function can be replaced with
Zhongyi Shi 2016/04/12 21:57:41 Thanks for catching this, this lives in the QUIC s
- if (c >= '0' && c <= '9') {
+ if (base::IsAsciiDigit(c)) {
*value = c - '0';
return true;
}

Powered by Google App Engine
This is Rietveld 408576698