diff options
author | brettw <brettw@chromium.org> | 2015-08-10 12:07:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-10 19:08:31 +0000 |
commit | fce8d19805ad83a006bbdd3ca68fc9d8eca621e6 (patch) | |
tree | 53b8fca581ffa89718788efe7a4295a662554d03 /chrome/app/chrome_main_delegate.cc | |
parent | a794ba10af6e3ac6d4661a2edc6f8d60642218af (diff) | |
download | chromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.zip chromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.tar.gz chromium_src-fce8d19805ad83a006bbdd3ca68fc9d8eca621e6.tar.bz2 |
Replace ToLower calls to the new format
Replaces
base::StringToLowerASCII(string)
with
base::ToLowerASCII(string)
This form is 1:1 search and replace.
A bunch of places did something like this:
std::string foo(something_else);
base::StringToLowerASCII(&foo);
which became:
foo = base::ToLowerASCII(something_else);
A couple places really wanted in-place changing and they became:
foo = base::ToLowerASCII(foo);
There was pretty trivial cleanup in chrome_main_delegate.cc chrome/test/chromedriver/server/http_handler.cc (fix indenting).
There was more cleanup in:
chrome/installer/util/language_selector.cc and components/plugins/renderer/mobile_youtube_plugin.cc
In components/history/core/browser/url_utils.cc I removed the call since it was calling ToLower on the host name out of a GURL, which is already guaranteed to be lower-case.
NOPRESUBMIT=true
(due to touching code with wstrings)
Review URL: https://codereview.chromium.org/1279123004
Cr-Commit-Position: refs/heads/master@{#342659}
Diffstat (limited to 'chrome/app/chrome_main_delegate.cc')
-rw-r--r-- | chrome/app/chrome_main_delegate.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index 031a0a1..254eae0 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -152,13 +152,11 @@ namespace { // Early versions of Chrome incorrectly registered a chromehtml: URL handler, // which gives us nothing but trouble. Avoid launching chrome this way since // some apps fail to properly escape arguments. -bool HasDeprecatedArguments(const std::wstring& command_line) { +bool HasDeprecatedArguments(const base::string16& command_line) { const wchar_t kChromeHtml[] = L"chromehtml:"; - std::wstring command_line_lower = command_line; + base::string16 command_line_lower = base::ToLowerASCII(command_line); // We are only searching for ASCII characters so this is OK. - base::StringToLowerASCII(&command_line_lower); - std::wstring::size_type pos = command_line_lower.find(kChromeHtml); - return (pos != std::wstring::npos); + return (command_line_lower.find(kChromeHtml) != base::string16::npos); } // If we try to access a path that is not currently available, we want the call |