summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 22:58:24 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 22:58:24 +0000
commitb2f5aae9b7d7410847ba29ecc8390f31beeec658 (patch)
treeda7ea3d046901e833aecd761c2ecc4756f3c038e /chrome/installer/util
parentb0258ab1379d432f00b41d67bf19c182d45c823e (diff)
downloadchromium_src-b2f5aae9b7d7410847ba29ecc8390f31beeec658.zip
chromium_src-b2f5aae9b7d7410847ba29ecc8390f31beeec658.tar.gz
chromium_src-b2f5aae9b7d7410847ba29ecc8390f31beeec658.tar.bz2
Revert some of the change to go back to multiple experiments
- Brian wants two experiments - This is not a full revert because I need to merge to 195 in stages BUG=none TEST=none TBR=kuchhal Review URL: http://codereview.chromium.org/467009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/browser_distribution.cc2
-rw-r--r--chrome/installer/util/browser_distribution.h2
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc13
-rw-r--r--chrome/installer/util/google_chrome_distribution.h2
4 files changed, 9 insertions, 10 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index fe9884f..25ed75f 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -115,5 +115,5 @@ void BrowserDistribution::LaunchUserExperiment(
}
-void BrowserDistribution::InactiveUserToastExperiment() {
+void BrowserDistribution::InactiveUserToastExperiment(int flavor) {
}
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index 8948bdc..5d26219 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -66,7 +66,7 @@ class BrowserDistribution {
// The user has qualified for the inactive user toast experiment and this
// function just performs it.
- virtual void InactiveUserToastExperiment();
+ virtual void InactiveUserToastExperiment(int flavor);
protected:
BrowserDistribution() {}
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index a9ba827..43e2058 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -96,12 +96,11 @@ int GetDirectoryWriteAgeInHours(const wchar_t* path) {
return (now_time - dir_time);
}
-// Launches again this same process with a single switch --|flag|.
+// Launches again this same process with a single switch --|flag|=|value|.
// Does not wait for the process to terminate.
-bool RelaunchSetup(const std::wstring& flag) {
+bool RelaunchSetup(const std::wstring& flag, int value) {
CommandLine cmd_line(CommandLine::ForCurrentProcess()->GetProgram());
- // TODO: make switches into ASCII.
- cmd_line.AppendSwitch(WideToASCII(flag));
+ cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value));
return base::LaunchApp(cmd_line, false, false, NULL);
}
@@ -461,14 +460,14 @@ void GoogleChromeDistribution::LaunchUserExperiment(
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);
+ RelaunchSetup(installer_util::switches::kInactiveUserToast, 0);
}
-void GoogleChromeDistribution::InactiveUserToastExperiment() {
+void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor) {
// User qualifies for the experiment. Launch chrome with --try-chrome=0.
int32 exit_code = 0;
std::wstring option(
- StringPrintf(L"--%ls=%d", switches::kTryChromeAgain, 0));
+ StringPrintf(L"--%ls=%d", switches::kTryChromeAgain, flavor));
if (!installer::LaunchChromeAndWaitForResult(false, option, &exit_code))
return;
// The chrome process has exited, figure out what happened.
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index c696e61..7aa265f 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -89,7 +89,7 @@ class GoogleChromeDistribution : public BrowserDistribution {
// Assuming that the user qualifies, this function performs the inactive user
// toast experiment. It will use chrome to show the UI and it will record the
// outcome in the registry.
- virtual void InactiveUserToastExperiment();
+ virtual void InactiveUserToastExperiment(int flavor);
private:
friend class BrowserDistribution;