summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 17:33:34 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 17:33:34 +0000
commit57404fe7c6193840b255a8efee96122bb5c6002b (patch)
treeb19a405e67b18f3c80e777ca9cefaadad994f173
parent9668838dea335d279409c621ede1730624acf7af (diff)
downloadchromium_src-57404fe7c6193840b255a8efee96122bb5c6002b.zip
chromium_src-57404fe7c6193840b255a8efee96122bb5c6002b.tar.gz
chromium_src-57404fe7c6193840b255a8efee96122bb5c6002b.tar.bz2
Fix bug when launching chrome
- Toast experiment was missing a space before "--" - Quote the first param (exe path) because it can contain spaces BUG= none TEST=chrome should uninstall as usual (launches chrome to confirm user action) Review URL: http://codereview.chromium.org/149048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19373 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc7
-rw-r--r--chrome/installer/util/helper.cc2
2 files changed, 4 insertions, 5 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 38474cc..56e3808 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -450,6 +450,8 @@ void GoogleChromeDistribution::LaunchUserExperiment(
}
}
LOG(INFO) << "User drafted for toast experiment";
+ if (!GoogleUpdateSettings::SetClient(kToastExpBaseGroup))
+ return;
// The experiment needs to be performed in a different process because
// google_update expects the upgrade process to be quick and nimble.
RelaunchSetup(installer_util::switches::kInactiveUserToast);
@@ -458,11 +460,8 @@ void GoogleChromeDistribution::LaunchUserExperiment(
void GoogleChromeDistribution::InactiveUserToastExperiment() {
// User qualifies for the experiment. Launch chrome with --try-chrome. Before
// that we need to change the client so we can track the progress.
- if (!GoogleUpdateSettings::SetClient(kToastExpBaseGroup))
- return;
int32 exit_code = 0;
- std::wstring option(L"--");
- option.append(switches::kTryChromeAgain);
+ std::wstring option(std::wstring(L" --") + switches::kTryChromeAgain);
if (!installer::LaunchChromeAndWaitForResult(false, option, &exit_code))
return;
// The chrome process has exited, figure out what happened.
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index a52f6b5..a87bcf9 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -61,7 +61,7 @@ bool installer::LaunchChromeAndWaitForResult(bool system_install,
return false;
file_util::AppendToPath(&chrome_exe, installer_util::kChromeExe);
- std::wstring command_line(chrome_exe);
+ std::wstring command_line(L"\"" + chrome_exe + L"\"");
command_line.append(options);
STARTUPINFOW si = {sizeof(si)};
PROCESS_INFORMATION pi = {0};