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

Side by Side Diff: base/command_line.cc

Issue 8368009: Replace most LOG statements with DLOG statements in base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « base/base_paths_linux.cc ('k') | base/debug/debugger.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 bool CommandLine::HasSwitch(const std::string& switch_string) const { 263 bool CommandLine::HasSwitch(const std::string& switch_string) const {
264 return switches_.find(LowerASCIIOnWindows(switch_string)) != switches_.end(); 264 return switches_.find(LowerASCIIOnWindows(switch_string)) != switches_.end();
265 } 265 }
266 266
267 std::string CommandLine::GetSwitchValueASCII( 267 std::string CommandLine::GetSwitchValueASCII(
268 const std::string& switch_string) const { 268 const std::string& switch_string) const {
269 StringType value = GetSwitchValueNative(switch_string); 269 StringType value = GetSwitchValueNative(switch_string);
270 if (!IsStringASCII(value)) { 270 if (!IsStringASCII(value)) {
271 LOG(WARNING) << "Value of switch (" << switch_string << ") must be ASCII."; 271 DLOG(WARNING) << "Value of switch (" << switch_string << ") must be ASCII.";
272 return ""; 272 return std::string();
273 } 273 }
274 #if defined(OS_WIN) 274 #if defined(OS_WIN)
275 return WideToASCII(value); 275 return WideToASCII(value);
276 #else 276 #else
277 return value; 277 return value;
278 #endif 278 #endif
279 } 279 }
280 280
281 FilePath CommandLine::GetSwitchValuePath( 281 FilePath CommandLine::GetSwitchValuePath(
282 const std::string& switch_string) const { 282 const std::string& switch_string) const {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 void CommandLine::ParseFromString(const std::wstring& command_line) { 387 void CommandLine::ParseFromString(const std::wstring& command_line) {
388 std::wstring command_line_string; 388 std::wstring command_line_string;
389 TrimWhitespace(command_line, TRIM_ALL, &command_line_string); 389 TrimWhitespace(command_line, TRIM_ALL, &command_line_string);
390 if (command_line_string.empty()) 390 if (command_line_string.empty())
391 return; 391 return;
392 392
393 int num_args = 0; 393 int num_args = 0;
394 wchar_t** args = NULL; 394 wchar_t** args = NULL;
395 args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args); 395 args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args);
396 396
397 PLOG_IF(FATAL, !args) << "CommandLineToArgvW failed on command line: " << 397 DPLOG_IF(FATAL, !args) << "CommandLineToArgvW failed on command line: "
398 command_line; 398 << command_line;
399 InitFromArgv(num_args, args); 399 InitFromArgv(num_args, args);
400 LocalFree(args); 400 LocalFree(args);
401 } 401 }
402 #endif 402 #endif
OLDNEW
« no previous file with comments | « base/base_paths_linux.cc ('k') | base/debug/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698