 Chromium Code Reviews
 Chromium Code Reviews Issue 2942923002:
  Implementing sign-in promo histograms for bookmark  (Closed)
    
  
    Issue 2942923002:
  Implementing sign-in promo histograms for bookmark  (Closed) 
  | Index: ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h | 
| diff --git a/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h b/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h | 
| index 3a41ff8097b970d491e423679a406399bce67433..942cf7ccc2e8fb7be07fe84b67f8fee545b058f2 100644 | 
| --- a/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h | 
| +++ b/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h | 
| @@ -14,6 +14,10 @@ | 
| @class SigninPromoViewConfigurator; | 
| @protocol SigninPromoViewConsumer; | 
| +namespace ios { | 
| +class ChromeBrowserState; | 
| +} // namespace ios | 
| + | 
| // Class that monitors the available identities and creates | 
| // SigninPromoViewConfigurator. This class makes the link between the model and | 
| // the view. The consumer will receive notification if default identity is | 
| @@ -30,8 +34,41 @@ | 
| // Access point used to send user action metrics. | 
| @property(nonatomic) signin_metrics::AccessPoint accessPoint; | 
| +// Preference key to count how many time the sign-in promo view is seen. The | 
| +// value should point to static storage. | 
| +@property(nonatomic) const char* displayedCountPreferenceKey; | 
| +// Preference key, set to true when the sign-in promo view is seen too much. The | 
| +// value should point to static storage. | 
| +@property(nonatomic) const char* alreadySeenSigninViewPreferenceKey; | 
| +// Histogram name to count how many times the signin promo is implicitly | 
| +// dismissed per impression. The value should point to static storage. | 
| +@property(nonatomic) const char* dismissalCountHistogramName; | 
| +// Histogram name to count how many times one of the "sign in" buttons is | 
| +// clicked per impression.The value should point to static storage. | 
| 
sdefresne
2017/06/22 12:40:39
nit: space after '.'
 
jlebel
2017/06/23 01:24:06
Done.
 | 
| +@property(nonatomic) const char* countTilSigninHistogramName; | 
| +// Histogram name to counts how many times the explicit "X"-to-close button is | 
| +// clicked per impression.The value should point to static storage. | 
| 
sdefresne
2017/06/22 12:40:38
nit: space after '.'
 
jlebel
2017/06/23 01:24:06
Done.
 | 
| +@property(nonatomic) const char* countTilXHistogramName; | 
| + | 
| +// See -[SigninPromoViewMediator initWithBrowserState:]. | 
| +- (instancetype)init NS_UNAVAILABLE; | 
| + | 
| +// Initialises with browser state. | 
| +- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState | 
| + NS_DESIGNATED_INITIALIZER; | 
| + | 
| - (SigninPromoViewConfigurator*)createConfigurator; | 
| +// Increments the "shown" counter used for histograms. Called when the signin | 
| +// promo view is visible | 
| +- (void)signinPromoViewVisible; | 
| + | 
| +// Called when the sign-in promo view is hidden. | 
| +- (void)signinPromoViewHidden; | 
| + | 
| +// Called when the sign-in promo view is dismissed. | 
| +- (void)signinPromoViewDismissed; | 
| + | 
| @end | 
| #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGNIN_PROMO_VIEW_MEDIATOR_H_ |