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

Unified Diff: chrome/common/logging_chrome.cc

Issue 373013: Use GetSwitchValueASCII. (Closed)
Patch Set: Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 323646884c6d1a01ce95403ab4a15e033758a97c..6af2128a6b456ad04e37ee55c8ea5ed2e0528ec7 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -117,7 +117,7 @@ void InitChromeLogging(const CommandLine& command_line,
if (enable_logging) {
// Let --enable-logging=stderr force only stderr, particularly useful for
// non-debug builds where otherwise you can't get logs to stderr at all.
- if (command_line.GetSwitchValue(switches::kEnableLogging) == L"stderr")
+ if (command_line.GetSwitchValueASCII(switches::kEnableLogging) == "stderr")
log_mode = logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG;
else
log_mode = kDefaultLoggingMode;
@@ -141,15 +141,16 @@ void InitChromeLogging(const CommandLine& command_line,
command_line.HasSwitch(switches::kNoErrorDialogs))
SuppressDialogs();
- std::wstring log_filter_prefix =
- command_line.GetSwitchValue(switches::kLogFilterPrefix);
- logging::SetLogFilterPrefix(WideToUTF8(log_filter_prefix).c_str());
+ std::string log_filter_prefix =
+ command_line.GetSwitchValueASCII(switches::kLogFilterPrefix);
+ logging::SetLogFilterPrefix(log_filter_prefix.c_str());
// Use a minimum log level if the command line has one, otherwise set the
// default to LOG_WARNING.
- std::wstring log_level = command_line.GetSwitchValue(switches::kLoggingLevel);
+ std::string log_level = command_line.GetSwitchValueASCII(
+ switches::kLoggingLevel);
int level = 0;
- if (StringToInt(WideToUTF16Hack(log_level), &level)) {
+ if (StringToInt(log_level, &level)) {
if ((level >= 0) && (level < LOG_NUM_SEVERITIES))
logging::SetMinLogLevel(level);
} else {
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698