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

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

Issue 8729009: Implement an AutoLaunch experiment for Chrome for certain brand codes. (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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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 }
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(
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
grt (UTC plus 2) 2011/11/29 18:55:45 } // namespace auto_launch_trial
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698