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 /media | |
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 'media')
-rw-r--r-- | media/base/mime_util.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/media/base/mime_util.cc b/media/base/mime_util.cc index 8878edd..00a2c74 100644 --- a/media/base/mime_util.cc +++ b/media/base/mime_util.cc @@ -533,7 +533,7 @@ static bool ParseH264CodecID(const std::string& codec_id, return false; } - std::string profile = base::StringToUpperASCII(codec_id.substr(5, 4)); + std::string profile = base::ToUpperASCII(codec_id.substr(5, 4)); if (IsValidH264BaselineProfile(profile)) { *codec = MimeUtil::H264_BASELINE; } else if (profile == "4D40") { @@ -546,8 +546,7 @@ static bool ParseH264CodecID(const std::string& codec_id, return true; } - *is_ambiguous = - !IsValidH264Level(base::StringToUpperASCII(codec_id.substr(9))); + *is_ambiguous = !IsValidH264Level(base::ToUpperASCII(codec_id.substr(9))); return true; } |