Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: chrome/browser/auto_launch_trial.h

Issue 8969024: Make sure the Autolaunch infobar... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/auto_launch_trial.cc » ('j') | chrome/browser/auto_launch_trial.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ 5 #ifndef CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_
6 #define CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ 6 #define CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
9 // Strings used with the "auto launching Chrome at computer startup" trial. If 11 // Strings used with the "auto launching Chrome at computer startup" trial. If
10 // the field trial is running then... 12 // the field trial is running then...
11 // base::FieldTrialList::TrialExists(kAutoLaunchTrial_Name) returns true. 13 // base::FieldTrialList::TrialExists(kAutoLaunchTrial_Name) returns true.
12 // 14 //
13 // The field trial consists of two groups of users: those that auto-launch 15 // 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 16 // 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. 17 // trial object is used to determine the group that the user belongs to.
16 // 18 //
17 // The field trial is setup in ChromeBrowserMainParts::AutoLaunchFieldTrial() 19 // The field trial is setup in ChromeBrowserMainParts::AutoLaunchFieldTrial()
18 // based on the user's brand code: 20 // based on the user's brand code:
19 // 21 //
20 // - brand RNGP auto launches Chrome on computer startup. 22 // - brand RNGP auto launches Chrome on computer startup.
21 // - brand RNGQ does not. 23 // - brand RNGQ does not.
22 // - any other brand code does whatever comes natural to it. 24 // - any other brand code does whatever comes natural to it.
23 25
24 extern const char kAutoLaunchTrialName[]; 26 extern const char kAutoLaunchTrialName[];
25 extern const char kAutoLaunchTrialAutoLaunchGroup[]; 27 extern const char kAutoLaunchTrialAutoLaunchGroup[];
26 extern const char kAutoLaunchTrialControlGroup[]; 28 extern const char kAutoLaunchTrialControlGroup[];
27 29
28 namespace auto_launch_trial { 30 namespace auto_launch_trial {
29 31
30 // The possible responses for the auto-launch infobar. 32 // The possible responses for the auto-launch infobar.
31 enum InfobarMetricResponse { 33 enum InfobarMetricResponse {
32 INFOBAR_CUT_IT_OUT = 0, 34 INFOBAR_CUT_IT_OUT = 0,
33 INFOBAR_OK, 35 INFOBAR_OK,
34 INFOBAR_IGNORE, 36 INFOBAR_IGNORE,
35 }; 37 };
36 38
37 // Whether the auto-launch experiment is active and the user is part of it. 39 // Whether the auto-launch experiment is active and the user is part of it.
38 bool IsInAutoLaunchGroup(); 40 bool IsInAutoLaunchFieldTrial();
41
42 // Whether the brand is part of the experiment group for auto-launch.
43 bool IsInExperimentGroup(const std::string& brand_code);
44
45 // Whether the brand is part of the control group for auto-launch.
46 bool IsInControlGroup(const std::string& brand_code);
39 47
40 // Updates UMA to reflect user changing the auto-launch setting. 48 // Updates UMA to reflect user changing the auto-launch setting.
41 void UpdateToggleAutoLaunchMetric(bool auto_launch); 49 void UpdateToggleAutoLaunchMetric(bool auto_launch);
42 50
43 // Updates UMA to reflect user responses to the infobar. 51 // Updates UMA to reflect user responses to the infobar.
44 void UpdateInfobarResponseMetric(InfobarMetricResponse response); 52 void UpdateInfobarResponseMetric(InfobarMetricResponse response);
45 53
46 // Updates UMA to reflect that the infobar has been shown. 54 // Updates UMA to reflect that the infobar has been shown.
47 void UpdateInfobarShownMetric(); 55 void UpdateInfobarShownMetric();
48 56
49 } // namespace auto_launch_trial 57 } // namespace auto_launch_trial
50 58
51 #endif // CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_ 59 #endif // CHROME_BROWSER_AUTO_LAUNCH_TRIAL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/auto_launch_trial.cc » ('j') | chrome/browser/auto_launch_trial.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698