diff options
author | brettw <brettw@chromium.org> | 2015-08-06 15:54:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-06 22:55:04 +0000 |
commit | c15100ce1266e52a77f2974ffe9dfb833f5e58b3 (patch) | |
tree | 9cf77374c512e02e4a1401db68a952d3107e0aec /base/files | |
parent | edfd2506bf1b5b270168fbab8b114e879abbb828 (diff) | |
download | chromium_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/files')
-rw-r--r-- | base/files/file_util_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/files/file_util_unittest.cc b/base/files/file_util_unittest.cc index 476ed16..4b95dbb 100644 --- a/base/files/file_util_unittest.cc +++ b/base/files/file_util_unittest.cc @@ -426,8 +426,8 @@ TEST_F(FileUtilTest, NormalizeFilePathReparsePoints) { TEST_F(FileUtilTest, DevicePathToDriveLetter) { // Get a drive letter. - std::wstring real_drive_letter = temp_dir_.path().value().substr(0, 2); - StringToUpperASCII(&real_drive_letter); + string16 real_drive_letter = + ToUpperASCII(temp_dir_.path().value().substr(0, 2)); if (!isalpha(real_drive_letter[0]) || ':' != real_drive_letter[1]) { LOG(ERROR) << "Can't get a drive letter to test with."; return; |