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

Side by Side Diff: chrome/browser/ui/webui/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: some code review comments 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
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_UI_WEBUI_SYNC_PROMO_TRIAL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 // These helpers manage the Sync Promo field trial. 10 // These helpers manage the Sync Promo field trial.
(...skipping 12 matching lines...) Expand all
23 // "Sync your personalized browser features between all your devices." 23 // "Sync your personalized browser features between all your devices."
24 PROMO_MSG_C, 24 PROMO_MSG_C,
25 25
26 // "You'll be automatically signed into to your favorite Google services." 26 // "You'll be automatically signed into to your favorite Google services."
27 PROMO_MSG_D, 27 PROMO_MSG_D,
28 28
29 // Bounding max value needed for UMA histogram macro. 29 // Bounding max value needed for UMA histogram macro.
30 PROMO_MSG_MAX, 30 PROMO_MSG_MAX,
31 }; 31 };
32 32
33 enum SyncPromoAndDefaultAppsCombination {
34 WITH_SYNC_PROMO_WITH_DEFAULT_APPS = 0,
35 WITH_SYNC_PROMO_WITHOUT_DEFAULT_APPS,
36 WITHOUT_SYNC_PROMO_WITH_DEFAULT_APPS,
37 WITHOUT_SYNC_PROMO_WITHOUT_DEFAULT_APPS,
38 SYNC_PROMO_AND_DEFAULT_APPS_BOUNDARY,
39 };
40
33 // Activate the field trial. Before this call, all calls to GetGroup will 41 // Activate the field trial. Before this call, all calls to GetGroup will
34 // return PROMO_MSG_A. *** MUST NOT BE CALLED MORE THAN ONCE. *** 42 // return PROMO_MSG_A. *** MUST NOT BE CALLED MORE THAN ONCE. ***
35 void Activate(); 43 void Activate();
36 44
37 // Returns true iff the experiment has been set up and is active. If this 45 // Returns true iff the experiment has been set up and is active. If this
38 // is false, the caller should not record stats for this experiment. 46 // is false, the caller should not record stats for this experiment.
39 bool IsExperimentActive(); 47 bool IsExperimentActive();
40 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
41 // Return the field trial group this client belongs to. 53 // Return the field trial group this client belongs to.
42 Group GetGroup(); 54 Group GetGroup();
43 55
44 // Return the resource ID for the Sync Promo message body associated with this 56 // Return the resource ID for the Sync Promo message body associated with this
45 // client. 57 // client.
46 int GetMessageBodyResID(); 58 int GetMessageBodyResID();
47 59
48 // Record the appropriate UMA stat for when a user sees the sync promo 60 // Record the appropriate UMA stat for when a user sees the sync promo
49 // message. 61 // message.
50 void RecordUserSawMessage(); 62 void RecordUserSawMessage();
51 63
64 // Record that a user was shown the promo when tagged with an experimental
65 // brand code.
66 void RecordUserShownPromoWithTrialBrand();
67
52 // Record the appropriate UMA stat for when a user successfully signs in to 68 // Record the appropriate UMA stat for when a user successfully signs in to
53 // GAIA. 69 // GAIA.
54 void RecordUserSignedIn(); 70 void RecordUserSignedIn();
71
72 // Record that a user signed in while tagged with a brand code currently being
73 // used in a field trial.
74 void RecordUserSignedInWithTrialBrand();
75
76 // If we've been tagged with any of the experimental brands to show the sync
77 // promo.
78 bool ShouldShowAtStartupBasedOnBrand();
55 } 79 }
56 80
81 extern const char kSyncPromoEnabledTrialName;
82
57 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_ 83 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698