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 #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 // 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 // Activate the field trial. Before this call, all calls to GetGroup will |
| 34 // return PROMO_MSG_A. *** MUST NOT BE CALLED MORE THAN ONCE. *** |
| 35 void Activate(); |
| 36 |
| 37 // 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. |
| 39 bool IsExperimentActive(); |
| 40 |
| 41 // Return the field trial group this client belongs to. |
| 42 Group GetGroup(); |
| 43 |
| 44 // Return the resource ID for the Sync Promo message body associated with this |
| 45 // client. |
| 46 int GetMessageBodyResID(); |
| 47 |
| 48 // Record the appropriate UMA stat for when a user sees the sync promo |
| 49 // message. |
| 50 void RecordUserSawMessage(); |
| 51 |
| 52 // Record the appropriate UMA stat for when a user successfully signs in to |
| 53 // GAIA. |
| 54 void RecordUserSignedIn(); |
| 55 } |
| 56 |
| 57 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_TRIAL_H_ |
OLD | NEW |