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

Side by Side Diff: base/command_line.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/chromeos/network/network_connect.cc ('k') | base/environment.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 "base/command_line.h" 5 #include "base/command_line.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #endif 89 #endif
90 } else { 90 } else {
91 command_line.AppendArgNative(arg); 91 command_line.AppendArgNative(arg);
92 } 92 }
93 } 93 }
94 } 94 }
95 95
96 // Lowercase switches for backwards compatiblity *on Windows*. 96 // Lowercase switches for backwards compatiblity *on Windows*.
97 std::string LowerASCIIOnWindows(const std::string& string) { 97 std::string LowerASCIIOnWindows(const std::string& string) {
98 #if defined(OS_WIN) 98 #if defined(OS_WIN)
99 return StringToLowerASCII(string); 99 return base::StringToLowerASCII(string);
100 #elif defined(OS_POSIX) 100 #elif defined(OS_POSIX)
101 return string; 101 return string;
102 #endif 102 #endif
103 } 103 }
104 104
105 105
106 #if defined(OS_WIN) 106 #if defined(OS_WIN)
107 // Quote a string as necessary for CommandLineToArgvW compatiblity *on Windows*. 107 // Quote a string as necessary for CommandLineToArgvW compatiblity *on Windows*.
108 std::wstring QuoteForCommandLineToArgvW(const std::wstring& arg) { 108 std::wstring QuoteForCommandLineToArgvW(const std::wstring& arg) {
109 // We follow the quoting rules of CommandLineToArgvW. 109 // We follow the quoting rules of CommandLineToArgvW.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args); 433 args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args);
434 434
435 DPLOG_IF(FATAL, !args) << "CommandLineToArgvW failed on command line: " 435 DPLOG_IF(FATAL, !args) << "CommandLineToArgvW failed on command line: "
436 << UTF16ToUTF8(command_line); 436 << UTF16ToUTF8(command_line);
437 InitFromArgv(num_args, args); 437 InitFromArgv(num_args, args);
438 LocalFree(args); 438 LocalFree(args);
439 } 439 }
440 #endif 440 #endif
441 441
442 } // namespace base 442 } // namespace base
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_connect.cc ('k') | base/environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698