From c15100ce1266e52a77f2974ffe9dfb833f5e58b3 Mon Sep 17 00:00:00 2001 From: brettw Date: Thu, 6 Aug 2015 15:54:16 -0700 Subject: 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} --- base/guid_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/guid_unittest.cc') 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))); } } -- cgit v1.1