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

Side by Side Diff: chrome/browser/ui/webui/sync_promo_trial.h

Issue 8689006: Create a field test for sync sign in promo strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: addressed nits and removed NTP cache stuff 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 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
7
8 #include "base/basictypes.h"
9
10 // This class manages the Sync Promo field trial.
11 //
12 // The sync promo involves changing the message body in the sign in promo (see
13 // SyncPromoHandler) to see if that has any effect on sign in.
14 class SyncPromoTrial {
James Hawkins 2011/11/28 21:42:09 Please get rid of the class and move these methods
SteveT 2011/11/28 22:11:15 Done.
15 public:
16 enum Group {
17 // "Get your bookmarks, history, and settings on all your devices."
18 // This is also the default message group.
19 PROMO_MSG_A = 0,
20
21 // "Back up your bookmarks, history, and settings to the web."
22 PROMO_MSG_B,
23
24 // "Sync your personalized browser features between all your devices."
25 PROMO_MSG_C,
26
27 // "You'll be automatically signed into to your favorite Google services."
28 PROMO_MSG_D,
29
30 // Bounding max value needed for UMA histogram macro.
31 PROMO_MSG_MAX,
32 };
33
34 // Activate the field trial. Before this call, all calls to GetGroup will
35 // return PROMO_MSG_A. *** MUST NOT BE CALLED MORE THAN ONCE. ***
36 static void Activate();
37
38 // Returns true iff the experiment has been set up and is active. If this
39 // is false, the caller should not record stats for this experiment.
40 static bool IsExperimentActive();
41
42 // Return the field trial group this client belongs to.
43 static Group GetGroup();
44
45 // Return the resource ID for the Sync Promo message body associated with this
46 // client.
47 static int GetMessageBodyResID();
48
49 // Record the appropriate UMA stat for when a user sees the sync promo
50 // message.
51 static void RecordUserSawMessage();
52
53 // Record the appropriate UMA stat for when a user successfully signs in to
54 // GAIA.
55 static void RecordUserSignedIn();
56
57 private:
58 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncPromoTrial);
59 };
60
61 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698