OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ |
| 6 #define CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ |
| 7 #pragma once |
| 8 |
| 9 // Strings used with the "auto launching Chrome at computer startup" trial. If |
| 10 // the field trial is running then... |
| 11 // base::FieldTrialList::TrialExists(kAutoLaunchTrial_Name) returns true. |
| 12 // |
| 13 // The field trial consists of two groups of users: those that auto-launch |
| 14 // Chrome at startup and those that don't. The group_name() of the field |
| 15 // trial object is used to determine the group that the user belongs to. |
| 16 // |
| 17 // The field trial is setup in ChromeBrowserMainParts::AutoLaunchFieldTrial() |
| 18 // based on the user's brand code: |
| 19 // |
| 20 // - brand RNGP auto launches Chrome on computer startup. |
| 21 // - brand RNGQ does not. |
| 22 // - any other brand code does whatever comes natural to it. |
| 23 |
| 24 extern const char kAutoLaunchTrialName[]; |
| 25 extern const char kAutoLaunchTrialAutoLaunchGroup[]; |
| 26 extern const char kAutoLaunchTrialControlGroup[]; |
| 27 |
| 28 namespace auto_launch_trial { |
| 29 |
| 30 // The possible responses for the auto-launch infobar. |
| 31 enum InfobarMetricResponse { |
| 32 INFOBAR_CUT_IT_OUT = 0, |
| 33 INFOBAR_OK, |
| 34 INFOBAR_IGNORE, |
| 35 }; |
| 36 |
| 37 // Whether the auto-launch experiment is active and the user is part of it. |
| 38 bool IsInAutoLaunchGroup(); |
| 39 |
| 40 // Updates UMA to reflect user changing the auto-launch setting. |
| 41 void UpdateToggleAutoLaunchMetric(bool auto_launch); |
| 42 |
| 43 // Updates UMA to reflect user responses to the infobar. |
| 44 void UpdateInfobarResponseMetric(InfobarMetricResponse response); |
| 45 |
| 46 // Updates UMA to reflect that the infobar has been shown. |
| 47 void UpdateInfobarShownMetric(); |
| 48 |
| 49 } // namespace auto_launch_trial |
| 50 |
| 51 #endif // CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ |
OLD | NEW |