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

Unified Diff: components/password_manager/core/browser/password_bubble_experiment.h

Issue 2588323002: Revert "Remove Finch support for PasswordBranding" (Closed)
Patch Set: Created 4 years 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: components/password_manager/core/browser/password_bubble_experiment.h
diff --git a/components/password_manager/core/browser/password_bubble_experiment.h b/components/password_manager/core/browser/password_bubble_experiment.h
index 7d900a7b95ac1932a145fe0ad164190310f118ad..cfb1ac6d3a5ea337145ddee96175183e2c323c5e 100644
--- a/components/password_manager/core/browser/password_bubble_experiment.h
+++ b/components/password_manager/core/browser/password_bubble_experiment.h
@@ -14,10 +14,13 @@ class SyncService;
namespace password_bubble_experiment {
+extern const char kBrandingExperimentName[];
extern const char kChromeSignInPasswordPromoExperimentName[];
extern const char kChromeSignInPasswordPromoThresholdParam[];
extern const char kSmartBubbleExperimentName[];
extern const char kSmartBubbleThresholdParam[];
+extern const char kSmartLockBrandingGroupName[];
+extern const char kSmartLockBrandingSavePromptOnlyGroupName[];
// Registers prefs which controls appearance of the first run experience for the
// Smart Lock UI, namely was first run experience shown for save prompt or auto
@@ -31,6 +34,35 @@ int GetSmartBubbleDismissalThreshold();
// A Smart Lock user is a sync user without a custom passphrase.
bool IsSmartLockUser(const syncer::SyncService* sync_service);
+enum class SmartLockBranding { NONE, FULL, SAVE_PROMPT_ONLY };
+
+// If the user is not a Smart Lock user, returns NONE. For Smart Lock users:
+// * returns NONE if the password manager should not be referred to as Smart
+// Lock anywhere;
+// * returns FULL, if it should be referred to as Smart Lock everywhere;
+// * returns SAVE_PROMPT_ONLY if it only should be referred to as Smart Lock in
+// the save password bubble.
+SmartLockBranding GetSmartLockBrandingState(
+ const syncer::SyncService* sync_service);
+
+// Convenience function for checking whether the result of
+// GetSmartLockBrandingState is SmartLockBranding::FULL.
+bool IsSmartLockBrandingEnabled(const syncer::SyncService* sync_service);
+
+// Convenience function for checking whether the result of
+// GetSmartLockBrandingState is not equal to SmartLockBranding::NONE.
+bool IsSmartLockBrandingSavePromptEnabled(
+ const syncer::SyncService* sync_service);
+
+// Returns true if save prompt should contain first run experience.
+bool ShouldShowSavePromptFirstRunExperience(
+ const syncer::SyncService* sync_service,
+ PrefService* prefs);
+
+// Sets appropriate value to the preference which controls appearance of the
+// first run experience for the save prompt.
+void RecordSavePromptFirstRunExperienceWasShown(PrefService* prefs);
+
// Returns true if first run experience for auto sign-in prompt should be shown.
bool ShouldShowAutoSignInPromptFirstRunExperience(PrefService* prefs);
« no previous file with comments | « components/password_manager/core/browser/DEPS ('k') | components/password_manager/core/browser/password_bubble_experiment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698