| OLD | NEW |
| 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_SYNC_PROMO_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 class Profile; |
| 11 |
| 10 // These helpers manage the Sync Promo field trial. | 12 // These helpers manage the Sync Promo field trial. |
| 11 // | 13 // |
| 12 // The sync promo experiment involves changing the message body in the sign in | 14 // 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. | 15 // promo (see SyncPromoHandler) to see if that has any effect on sign in. |
| 14 namespace sync_promo_trial { | 16 namespace sync_promo_trial { |
| 15 enum Group { | 17 enum Group { |
| 16 // "Get your bookmarks, history, and settings on all your devices." | 18 // "Get your bookmarks, history, and settings on all your devices." |
| 17 // This is also the default message group. | 19 // This is also the default message group. |
| 18 PROMO_MSG_A = 0, | 20 PROMO_MSG_A = 0, |
| 19 | 21 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Return the resource ID for the Sync Promo message body associated with this | 61 // Return the resource ID for the Sync Promo message body associated with this |
| 60 // client. | 62 // client. |
| 61 int GetMessageBodyResID(); | 63 int GetMessageBodyResID(); |
| 62 | 64 |
| 63 // Record the appropriate UMA stat for when a user sees the sync promo | 65 // Record the appropriate UMA stat for when a user sees the sync promo |
| 64 // message. | 66 // message. |
| 65 void RecordUserSawMessage(); | 67 void RecordUserSawMessage(); |
| 66 | 68 |
| 67 // Record that a user was shown the promo when tagged with an experimental | 69 // Record that a user was shown the promo when tagged with an experimental |
| 68 // brand code. | 70 // brand code. |
| 69 void RecordUserShownPromoWithTrialBrand(); | 71 void RecordUserShownPromoWithTrialBrand(bool is_at_startup, Profile* profile); |
| 70 | 72 |
| 71 // Record the appropriate UMA stat for when a user successfully signs in to | 73 // Record the appropriate UMA stat for when a user successfully signs in to |
| 72 // GAIA. | 74 // GAIA. |
| 73 void RecordUserSignedIn(); | 75 void RecordUserSignedIn(); |
| 74 | 76 |
| 75 // Record that a user signed in while tagged with a brand code currently being | 77 // Record that a user signed in while tagged with a brand code currently being |
| 76 // used in a field trial. | 78 // used in a field trial. |
| 77 void RecordUserSignedInWithTrialBrand(); | 79 void RecordUserSignedInWithTrialBrand(bool is_at_startup, Profile* profile); |
| 78 | 80 |
| 79 // If we've been tagged with any of the experimental brands to show the sync | 81 // If we've been tagged with any of the experimental brands to show the sync |
| 80 // promo. | 82 // promo. |
| 81 bool ShouldShowAtStartupBasedOnBrand(); | 83 bool ShouldShowAtStartupBasedOnBrand(); |
| 82 } | 84 } |
| 83 | 85 |
| 84 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_ | 86 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_TRIAL_H_ |
| OLD | NEW |