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

Unified Diff: ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h

Issue 2942923002: Implementing sign-in promo histograms for bookmark (Closed)
Patch Set: Renaming histograms Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
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..a5be9e98a0d5e52ed99f12a9990b04dded803fbd 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,18 @@
@class SigninPromoViewConfigurator;
@protocol SigninPromoViewConsumer;
+namespace ios {
+class ChromeBrowserState;
+
+// Enums to choose which histograms is used to record the user actions.
+enum class SigninPromoViewHistograms {
+ // No histograms.
+ None,
+ // Histograms: MobileSignInPromo.BookmarkManager.*.
+ Bookmarks,
+};
+} // 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 +42,34 @@
// 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;
+// Histograms to use for the user actions.
+@property(nonatomic) ios::SigninPromoViewHistograms histograms;
+
+// 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_
« no previous file with comments | « ios/chrome/browser/ui/authentication/BUILD.gn ('k') | ios/chrome/browser/ui/authentication/signin_promo_view_mediator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698