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

Unified Diff: url/url_canon_fileurl.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: url/url_canon_fileurl.cc
diff --git a/url/url_canon_fileurl.cc b/url/url_canon_fileurl.cc
index 6191f8f9b2ca13d66e0193112a81f94520563c52..6277289be7d3df7401863f364060528ee45de25f 100644
--- a/url/url_canon_fileurl.cc
+++ b/url/url_canon_fileurl.cc
@@ -4,6 +4,7 @@
// Functions for canonicalizing "file:" URLs.
+#include "base/strings/string_util.h"
#include "url/url_canon.h"
#include "url/url_canon_internal.h"
#include "url/url_file.h"
@@ -39,7 +40,7 @@ int FileDoDriveSpec(const CHAR* spec, int begin, int end,
// and that it is followed by a colon/pipe.
// Normalize Windows drive letters to uppercase
- if (spec[after_slashes] >= 'a' && spec[after_slashes] <= 'z')
+ if (base::IsAsciiLower(spec[after_slashes]))
output->push_back(static_cast<char>(spec[after_slashes] - 'a' + 'A'));
else
output->push_back(static_cast<char>(spec[after_slashes]));

Powered by Google App Engine
This is Rietveld 408576698