summaryrefslogtreecommitdiffstats
path: root/base/guid_unittest.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-06 15:54:16 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-06 22:55:04 +0000
commitc15100ce1266e52a77f2974ffe9dfb833f5e58b3 (patch)
tree9cf77374c512e02e4a1401db68a952d3107e0aec /base/guid_unittest.cc
parentedfd2506bf1b5b270168fbab8b114e879abbb828 (diff)
downloadchromium_src-c15100ce1266e52a77f2974ffe9dfb833f5e58b3.zip
chromium_src-c15100ce1266e52a77f2974ffe9dfb833f5e58b3.tar.gz
chromium_src-c15100ce1266e52a77f2974ffe9dfb833f5e58b3.tar.bz2
Replace StringToLowerASCII with base::ToLowerASCII
Standardize on using string pieces and returning strings. Remove in-place version (this was only used in a couple places and they were not performance-critical). De-templatize the character versions of ToUpperASCII/ToLowerASCII. This would lead to bizarre errors if you pass other things (like a string). This is so little code, it's now just duplicated. I renamed StringToLowerASCII to just be ToLowerASCII so you can pass whatever you want to ToLowerASCII and it does the right thing. This seems simpler to me. This replaces all calls of StringToUpperASCII to the new form. The lowercase version is more common and will be done in a separate pass. Review URL: https://codereview.chromium.org/1280473002 Cr-Commit-Position: refs/heads/master@{#342219}
Diffstat (limited to 'base/guid_unittest.cc')
-rw-r--r--base/guid_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/guid_unittest.cc b/base/guid_unittest.cc
index 1485497..1c5d393 100644
--- a/base/guid_unittest.cc
+++ b/base/guid_unittest.cc
@@ -43,8 +43,8 @@ TEST(GUIDTest, GUIDCorrectlyFormatted) {
for (int it = 0; it < kIterations; ++it) {
std::string guid = GenerateGUID();
EXPECT_TRUE(IsValidGUID(guid));
- EXPECT_TRUE(IsValidGUID(StringToLowerASCII(guid)));
- EXPECT_TRUE(IsValidGUID(StringToUpperASCII(guid)));
+ EXPECT_TRUE(IsValidGUID(ToLowerASCII(guid)));
+ EXPECT_TRUE(IsValidGUID(ToUpperASCII(guid)));
}
}