summaryrefslogtreecommitdiffstats
path: root/chrome/browser/auto_launch_trial.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 10:45:32 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 10:45:32 +0000
commit0cba296108328045bad62e2286f5ec6a2e4fd7e8 (patch)
tree5d60490adfbb0d68f62e51809551b6cfb6e19063 /chrome/browser/auto_launch_trial.h
parente69786054d76d7a8cc2a15536597b2ffb248afde (diff)
downloadchromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.zip
chromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.tar.gz
chromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.tar.bz2
Implement an AutoLaunch experiment for Chrome for certain brand codes. This is for Windows only.
BUG=95971 TEST=This requires a special branded build to test (and master_preferences set to have auto_launch_chrome: true or specify mini_installer param --auto-launch-chrome), but after installing it you should see an item under the Wrench \ Options \ Basics that lets you configure Chrome to not auto-launch. If you instead, log out and log in again, Chrome should start with an infobar saying that it was auto-launched. The infobar should stay for a max of 5 launches and then not appear again. Pressing "Cut it out!" on the infobar should turn off this feature. If you just want to test the infobar, launch chrome with --auto-launch-at-startup. Also, uninstall and make sure Chrome is not auto-launched (a Windows error about Chrome not being found should not be shown). Review URL: http://codereview.chromium.org/8729009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/auto_launch_trial.h')
-rw-r--r--chrome/browser/auto_launch_trial.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/chrome/browser/auto_launch_trial.h b/chrome/browser/auto_launch_trial.h
new file mode 100644
index 0000000..69a3e9d
--- /dev/null
+++ b/chrome/browser/auto_launch_trial.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_
+#define CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_
+#pragma once
+
+// Strings used with the "auto launching Chrome at computer startup" trial. If
+// the field trial is running then...
+// base::FieldTrialList::TrialExists(kAutoLaunchTrial_Name) returns true.
+//
+// The field trial consists of two groups of users: those that auto-launch
+// Chrome at startup and those that don't. The group_name() of the field
+// trial object is used to determine the group that the user belongs to.
+//
+// The field trial is setup in ChromeBrowserMainParts::AutoLaunchFieldTrial()
+// based on the user's brand code:
+//
+// - brand RNGP auto launches Chrome on computer startup.
+// - brand RNGQ does not.
+// - any other brand code does whatever comes natural to it.
+
+extern const char kAutoLaunchTrialName[];
+extern const char kAutoLaunchTrialAutoLaunchGroup[];
+extern const char kAutoLaunchTrialControlGroup[];
+
+namespace auto_launch_trial {
+
+// The possible responses for the auto-launch infobar.
+enum InfobarMetricResponse {
+ INFOBAR_CUT_IT_OUT = 0,
+ INFOBAR_OK,
+ INFOBAR_IGNORE,
+};
+
+// Whether the auto-launch experiment is active and the user is part of it.
+bool IsInAutoLaunchGroup();
+
+// Updates UMA to reflect user changing the auto-launch setting.
+void UpdateToggleAutoLaunchMetric(bool auto_launch);
+
+// Updates UMA to reflect user responses to the infobar.
+void UpdateInfobarResponseMetric(InfobarMetricResponse response);
+
+// Updates UMA to reflect that the infobar has been shown.
+void UpdateInfobarShownMetric();
+
+} // namespace auto_launch_trial
+
+#endif // CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_