diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 02:07:25 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 02:07:25 +0000 |
commit | b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78 (patch) | |
tree | d723b8556ad386a0b8a6e999e3a842e0bfe6f9b0 /chrome/installer | |
parent | 1976d41ac728fcceb30f2df3c243cb7417f538f1 (diff) | |
download | chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.zip chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.tar.gz chromium_src-b7e0a2a3ccf5aceb891d5e1dfaf9db1bbaaa5f78.tar.bz2 |
Use ASCII strings for switch names.
Review URL: http://codereview.chromium.org/270062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 3 | ||||
-rw-r--r-- | chrome/installer/util/logging_installer.cc | 12 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 9 |
3 files changed, 15 insertions, 9 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index bed5b83..3dd8699 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -106,7 +106,8 @@ int GetDirectoryWriteAgeInHours(const wchar_t* path) { // Does not wait for the process to terminate. bool RelaunchSetup(const std::wstring& flag, int value) { CommandLine cmd_line(CommandLine::ForCurrentProcess()->program()); - cmd_line.AppendSwitchWithValue(flag, IntToWString(value)); + // TODO: make switches into ASCII. + cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value)); return base::LaunchApp(cmd_line, false, false, NULL); } diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc index 25dceb2..02c0d9d 100644 --- a/chrome/installer/util/logging_installer.cc +++ b/chrome/installer/util/logging_installer.cc @@ -22,7 +22,8 @@ void InitInstallerLogging(const CommandLine& command_line) { if (installer_logging_) return; - if (command_line.HasSwitch(installer_util::switches::kDisableLogging)) { + if (command_line.HasSwitch( + WideToASCII(installer_util::switches::kDisableLogging))) { installer_logging_ = true; return; } @@ -32,7 +33,8 @@ void InitInstallerLogging(const CommandLine& command_line) { logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); - if (command_line.HasSwitch(installer_util::switches::kVerboseLogging)) { + if (command_line.HasSwitch( + WideToASCII(installer_util::switches::kVerboseLogging))) { logging::SetMinLogLevel(logging::LOG_INFO); } else { logging::SetMinLogLevel(logging::LOG_ERROR); @@ -48,8 +50,10 @@ void EndInstallerLogging() { } std::wstring GetLogFilePath(const CommandLine& command_line) { - if (command_line.HasSwitch(installer_util::switches::kLogFile)) { - return command_line.GetSwitchValue(installer_util::switches::kLogFile); + if (command_line.HasSwitch( + WideToASCII(installer_util::switches::kLogFile))) { + return command_line.GetSwitchValue( + WideToASCII(installer_util::switches::kLogFile)); } const std::wstring log_filename(L"chrome_installer.log"); diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index c4705a8..86e588b 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -81,12 +81,13 @@ class RegistryEntry { start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); std::wstring install_info(start_menu_entry + L"\\InstallInfo"); + // TODO: use CommandLine API instead of constructing command lines. entries->push_front(new RegistryEntry(install_info, L"ReinstallCommand", - quoted_exe_path + L" --" + switches::kMakeDefaultBrowser)); + quoted_exe_path + L" --" + ASCIIToWide(switches::kMakeDefaultBrowser))); entries->push_front(new RegistryEntry(install_info, L"HideIconsCommand", - quoted_exe_path + L" --" + switches::kHideIcons)); + quoted_exe_path + L" --" + ASCIIToWide(switches::kHideIcons))); entries->push_front(new RegistryEntry(install_info, L"ShowIconsCommand", - quoted_exe_path + L" --" + switches::kShowIcons)); + quoted_exe_path + L" --" + ASCIIToWide(switches::kShowIcons))); entries->push_front(new RegistryEntry(install_info, L"IconsVisible", 1)); std::wstring capabilities(start_menu_entry + L"\\Capabilities"); @@ -286,7 +287,7 @@ bool IsChromeRegistered(const std::wstring& chrome_exe, return registered; } -// This method registers Chrome on Vista by launching eleavated setup.exe. +// This method registers Chrome on Vista by launching eleavated setup.exe. // That will show user standard Vista elevation prompt. If user accepts it // the new process will make the necessary changes and return SUCCESS that // we capture and return. |