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

Unified Diff: chrome/installer/util/logging_installer.cc

Issue 3057033: Remove GetSwitchValue() from chrome/* where easy. (Closed)
Patch Set: finally Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/logging_installer.cc
diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc
index 3f11eb5d336f6b08d95816a5e4c61202eec67b47..9dfda73c66c37f90bb6e2d93a42ffe0c3325341b 100644
--- a/chrome/installer/util/logging_installer.cc
+++ b/chrome/installer/util/logging_installer.cc
@@ -29,7 +29,7 @@ void InitInstallerLogging(const CommandLine& command_line) {
return;
}
- logging::InitLogging(GetLogFilePath(command_line).c_str(),
+ logging::InitLogging(GetLogFilePath(command_line).value().c_str(),
logging::LOG_ONLY_TO_FILE,
logging::LOCK_LOG_FILE,
logging::DELETE_OLD_LOG_FILE);
@@ -50,10 +50,10 @@ void EndInstallerLogging() {
installer_logging_ = false;
}
-std::wstring GetLogFilePath(const CommandLine& command_line) {
+FilePath GetLogFilePath(const CommandLine& command_line) {
if (command_line.HasSwitch(
WideToASCII(installer_util::switches::kLogFile))) {
- return command_line.GetSwitchValue(
+ return command_line.GetSwitchValuePath(
WideToASCII(installer_util::switches::kLogFile));
}
@@ -65,12 +65,11 @@ std::wstring GetLogFilePath(const CommandLine& command_line) {
}
FilePath log_path;
-
if (PathService::Get(base::DIR_TEMP, &log_path)) {
log_path = log_path.Append(log_filename);
- return log_path.ToWStringHack();
+ return log_path;
} else {
- return log_filename;
+ return FilePath(log_filename);
}
}

Powered by Google App Engine
This is Rietveld 408576698