Chromium Code Reviews| Index: chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h |
| diff --git a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h |
| index 72b400e5eb936c5a3974e9badcbab1f1b4a5932c..c71007a70ec85112bc275d099370f0bf38396622 100644 |
| --- a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h |
| +++ b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h |
| @@ -23,21 +23,25 @@ class PrefService; |
| namespace desktop_ios_promotion { |
| // Represents the reason that the Desktop to iOS promotion was dismissed for. |
| +// These values are written to logs. New values can be added, but existing |
| +// values must never be reordered or deleted and reused. |
| enum class PromotionDismissalReason { |
| FOCUS_LOST = 0, |
| - TAB_SWITCHED, |
| NO_THANKS, |
| CLOSE_BUTTON, |
| SEND_SMS, |
| - LEARN_MORE_CLICKED, |
| }; |
| +enum class EntryPointLocalPrefType { IMPRESSIONS = 0, DISMISSED = 1 }; |
| + |
| // The place where the promotion appeared. |
| +// These values are written to logs. New values can be added, but existing |
| +// values must never be reordered or deleted and reused. |
| enum class PromotionEntryPoint { |
| - SAVE_PASSWORD_BUBBLE = 0, |
| - BOOKMARKS_BUBBLE, |
| - BOOKMARKS_FOOTNOTE, |
| - HISTORY_PAGE |
| + SAVE_PASSWORD_BUBBLE = 1, |
| + BOOKMARKS_BUBBLE = 2, |
| + BOOKMARKS_FOOTNOTE = 3, |
| + HISTORY_PAGE = 4 |
| }; |
| // Entry points local prefs, each entry point has a preference for impressions |
| @@ -56,11 +60,10 @@ const char* const kEntryPointLocalPrefs[4][2] = { |
| bool IsEligibleForIOSPromotion(PrefService* prefs, |
| const syncer::SyncService* sync_service, |
| - desktop_ios_promotion::PromotionEntryPoint); |
| + PromotionEntryPoint); |
|
sky
2017/02/16 00:13:36
All function arguments should be named (see style
mrefaat
2017/02/16 21:02:39
Ack, typo
|
| // Returns the Bubble text based on the promotion entry point. |
| -base::string16 GetPromoBubbleText( |
| - desktop_ios_promotion::PromotionEntryPoint entry_point); |
| +base::string16 GetPromoBubbleText(PromotionEntryPoint entry_point); |
| // Register all Priority Sync preferences. |
| void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| @@ -68,6 +71,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| // Register all local only Preferences. |
| void RegisterLocalPrefs(PrefRegistrySimple* registry); |
| +// Log promotion dismissal reason for entry points. |
| +void LogDismissalReason(PromotionDismissalReason reason, |
| + PromotionEntryPoint entry_point); |
| + |
| } // namespace desktop_ios_promotion |
| #endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ |