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

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

Issue 8933003: [Sync Promo UI] Changing sync promo to honor brand codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removing supposedly needless .gypi deps 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
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_SYNC_PROMO_TRIAL_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_
7
8 #include "base/basictypes.h"
9
10 // These helpers manage the Sync Promo field trial.
11 //
12 // The sync promo experiment involves changing the message body in the sign in
13 // promo (see SyncPromoHandler) to see if that has any effect on sign in.
14 namespace sync_promo_trial {
15 enum Group {
16 // "Get your bookmarks, history, and settings on all your devices."
17 // This is also the default message group.
18 PROMO_MSG_A = 0,
19
20 // "Back up your bookmarks, history, and settings to the web."
21 PROMO_MSG_B,
22
23 // "Sync your personalized browser features between all your devices."
24 PROMO_MSG_C,
25
26 // "You'll be automatically signed into to your favorite Google services."
27 PROMO_MSG_D,
28
29 // Bounding max value needed for UMA histogram macro.
30 PROMO_MSG_MAX,
31 };
32
33 enum SyncPromoEnabledBrandUMABuckets {
34 WITH_SYNC_PROMO_WITH_DEFAULT_APPS = 0,
35 WITH_SYNC_PROMO_WITHOUT_DEFAULT_APPS,
36 WITHOUT_SYNC_PROMO_WITHOUT_DEFAULT_APPS_A,
37 WITHOUT_SYNC_PROMO_WITHOUT_DEFAULT_APPS_B,
38 SYNC_PROMO_AND_DEFAULT_APPS_BOUNDARY,
39 };
40
41 // Activate the field trial. Before this call, all calls to GetGroup will
42 // return PROMO_MSG_A. *** MUST NOT BE CALLED MORE THAN ONCE. ***
43 void Activate();
44
45 // Returns true iff the experiment has been set up and is active. If this
46 // is false, the caller should not record stats for this experiment.
47 bool IsExperimentActive();
48
49 // If the user has been tagged with a brand code at install time that
50 // determines if they should see the sync promo or not.
51 bool IsPartOfBrandTrialToEnable();
52
53 // Return the field trial group this client belongs to.
54 Group GetGroup();
55
56 // Return the UMA bucket
57 int GetSyncPromoBrandUMABucketFromGroup();
58
59 // Return the resource ID for the Sync Promo message body associated with this
60 // client.
61 int GetMessageBodyResID();
62
63 // Record the appropriate UMA stat for when a user sees the sync promo
64 // message.
65 void RecordUserSawMessage();
66
67 // Record that a user was shown the promo when tagged with an experimental
68 // brand code.
69 void RecordUserShownPromoWithTrialBrand();
70
71 // Record the appropriate UMA stat for when a user successfully signs in to
72 // GAIA.
73 void RecordUserSignedIn();
74
75 // Record that a user signed in while tagged with a brand code currently being
76 // used in a field trial.
77 void RecordUserSignedInWithTrialBrand();
78
79 // If we've been tagged with any of the experimental brands to show the sync
80 // promo.
81 bool ShouldShowAtStartupBasedOnBrand();
82 }
83
84 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698