|
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 #include "chrome/browser/auto_launch_trial.h" | |
6 | |
7 #include "base/metrics/field_trial.h" | |
8 #include "base/metrics/histogram.h" | |
9 | |
10 const char kAutoLaunchTrial_Name[] = "AutoLaunchExperiment"; | |
11 const char kAutoLaunchTrial_AutoLaunchGroup[] = "AutoLaunching"; | |
12 const char kAutoLaunchTrial_ControlGroup[] = "NotAutoLaunching"; | |
13 | |
14 namespace auto_launch_trial { | |
15 | |
16 bool IsInAutoLaunchGroup() { | |
17 return base::FieldTrialList::TrialExists(kAutoLaunchTrial_Name) && | |
18 base::FieldTrialList::Find(kAutoLaunchTrial_Name)->group_name() | |
19 == kAutoLaunchTrial_AutoLaunchGroup; | |
20 } | |
Roger Tawa OOO till Jul 10th
2011/12/07 15:38:37
Shouldn't you also check the master prefs file her
Finnur
2011/12/13 15:53:24
Done.
| |
21 | |
22 void UpdateToggleAutoLaunchMetric(bool auto_launch) { | |
23 UMA_HISTOGRAM_ENUMERATION( | |
24 base::FieldTrial::MakeName("ToggleAutoLaunch", kAutoLaunchTrial_Name), | |
25 auto_launch ? 1 : 0, 2); | |
26 } | |
27 | |
28 void UpdateInfobarResponseMetric(int response) { | |
29 UMA_HISTOGRAM_ENUMERATION( | |
Roger Tawa OOO till Jul 10th
2011/12/07 15:38:37
assert response < 3 ?
Finnur
2011/12/13 15:53:24
Converted to enum.
On 2011/12/07 15:38:37, Roger
| |
30 base::FieldTrial::MakeName("InfobarRepsonse", kAutoLaunchTrial_Name), | |
31 response, 3); | |
32 } | |
33 | |
34 void UpdateInfobarShownMetric() { | |
35 UMA_HISTOGRAM_COUNTS( | |
36 base::FieldTrial::MakeName("InfobarShown", kAutoLaunchTrial_Name), 1); | |
37 } | |
38 | |
39 } // namespace auto_launch_trial | |
OLD | NEW |