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

Unified Diff: url/url_file.h

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
« net/quic/test_tools/crypto_test_utils.cc ('K') | « url/url_canon_internal_file.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_file.h
diff --git a/url/url_file.h b/url/url_file.h
index 540cb2543eb8cf9b37f95b6cfb8b0034f107a218..796d12c1880832e22d489c3ed4fc8f3a3e67813a 100644
--- a/url/url_file.h
+++ b/url/url_file.h
@@ -8,6 +8,7 @@
// Provides shared functions used by the internals of the parser and
// canonicalizer for file URLs. Do not use outside of these modules.
+#include "base/strings/string_util.h"
#include "url/url_parse_internal.h"
namespace url {
@@ -18,9 +19,6 @@ namespace url {
inline bool IsWindowsDriveSeparator(base::char16 ch) {
return ch == ':' || ch == '|';
}
-inline bool IsWindowsDriveLetter(base::char16 ch) {
- return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
-}
#endif // WIN32
@@ -48,7 +46,7 @@ inline bool DoesBeginWindowsDriveSpec(const CHAR* spec, int start_offset,
int remaining_len = spec_len - start_offset;
if (remaining_len < 2)
return false; // Not enough room.
- if (!IsWindowsDriveLetter(spec[start_offset]))
+ if (!base::IsAsciiAlpha(spec[start_offset]))
return false; // Doesn't start with a valid drive letter.
if (!IsWindowsDriveSeparator(spec[start_offset + 1]))
return false; // Isn't followed with a drive separator.
« net/quic/test_tools/crypto_test_utils.cc ('K') | « url/url_canon_internal_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698