Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/i18n/rtl.cc ('k') | chrome/app/signature_validator_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 extern int NaClMain(const content::MainFunctionParams&); 146 extern int NaClMain(const content::MainFunctionParams&);
147 extern int ServiceProcessMain(const content::MainFunctionParams&); 147 extern int ServiceProcessMain(const content::MainFunctionParams&);
148 148
149 namespace { 149 namespace {
150 150
151 #if defined(OS_WIN) 151 #if defined(OS_WIN)
152 // Early versions of Chrome incorrectly registered a chromehtml: URL handler, 152 // Early versions of Chrome incorrectly registered a chromehtml: URL handler,
153 // which gives us nothing but trouble. Avoid launching chrome this way since 153 // which gives us nothing but trouble. Avoid launching chrome this way since
154 // some apps fail to properly escape arguments. 154 // some apps fail to properly escape arguments.
155 bool HasDeprecatedArguments(const std::wstring& command_line) { 155 bool HasDeprecatedArguments(const base::string16& command_line) {
156 const wchar_t kChromeHtml[] = L"chromehtml:"; 156 const wchar_t kChromeHtml[] = L"chromehtml:";
157 std::wstring command_line_lower = command_line; 157 base::string16 command_line_lower = base::ToLowerASCII(command_line);
158 // We are only searching for ASCII characters so this is OK. 158 // We are only searching for ASCII characters so this is OK.
159 base::StringToLowerASCII(&command_line_lower); 159 return (command_line_lower.find(kChromeHtml) != base::string16::npos);
160 std::wstring::size_type pos = command_line_lower.find(kChromeHtml);
161 return (pos != std::wstring::npos);
162 } 160 }
163 161
164 // If we try to access a path that is not currently available, we want the call 162 // If we try to access a path that is not currently available, we want the call
165 // to fail rather than show an error dialog. 163 // to fail rather than show an error dialog.
166 void SuppressWindowsErrorDialogs() { 164 void SuppressWindowsErrorDialogs() {
167 UINT new_flags = SEM_FAILCRITICALERRORS | 165 UINT new_flags = SEM_FAILCRITICALERRORS |
168 SEM_NOOPENFILEERRORBOX; 166 SEM_NOOPENFILEERRORBOX;
169 167
170 // Preserve existing error mode. 168 // Preserve existing error mode.
171 UINT existing_flags = SetErrorMode(new_flags); 169 UINT existing_flags = SetErrorMode(new_flags);
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 case version_info::Channel::CANARY: 972 case version_info::Channel::CANARY:
975 return true; 973 return true;
976 case version_info::Channel::DEV: 974 case version_info::Channel::DEV:
977 case version_info::Channel::BETA: 975 case version_info::Channel::BETA:
978 case version_info::Channel::STABLE: 976 case version_info::Channel::STABLE:
979 default: 977 default:
980 // Don't enable instrumentation. 978 // Don't enable instrumentation.
981 return false; 979 return false;
982 } 980 }
983 } 981 }
OLDNEW
« no previous file with comments | « base/i18n/rtl.cc ('k') | chrome/app/signature_validator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698