summaryrefslogtreecommitdiffstats
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/renderer/runtime_custom_bindings.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/renderer/runtime_custom_bindings.cc b/extensions/renderer/runtime_custom_bindings.cc
index a7a5ff6..6e10e10 100644
--- a/extensions/renderer/runtime_custom_bindings.cc
+++ b/extensions/renderer/runtime_custom_bindings.cc
@@ -125,8 +125,8 @@ void RuntimeCustomBindings::GetExtensionViews(
// all views for the current extension.
int browser_window_id = args[0]->Int32Value();
- std::string view_type_string = *v8::String::Utf8Value(args[1]);
- base::StringToUpperASCII(&view_type_string);
+ std::string view_type_string =
+ base::ToUpperASCII(*v8::String::Utf8Value(args[1]));
// |view_type| == VIEW_TYPE_INVALID means getting any type of
// views.
ViewType view_type = VIEW_TYPE_INVALID;