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

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

Issue 2653733006: Remove the Finch experiment for the sign-in promo in the password bubble. (Closed)
Patch Set: fix mac/2 Created 3 years, 11 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: components/password_manager/core/browser/password_bubble_experiment.cc
diff --git a/components/password_manager/core/browser/password_bubble_experiment.cc b/components/password_manager/core/browser/password_bubble_experiment.cc
index ff0b3ef493a395c0c43caf6a8ce81908fa5f326b..8e2a46e69d7c58075abbc0776e94a0883bb9e302 100644
--- a/components/password_manager/core/browser/password_bubble_experiment.cc
+++ b/components/password_manager/core/browser/password_bubble_experiment.cc
@@ -18,8 +18,6 @@
namespace password_bubble_experiment {
-const char kChromeSignInPasswordPromoExperimentName[] = "SignInPasswordPromo";
-const char kChromeSignInPasswordPromoThresholdParam[] = "dismissal_threshold";
const char kSmartBubbleExperimentName[] = "PasswordSmartBubble";
const char kSmartBubbleThresholdParam[] = "dismissal_count";
@@ -66,20 +64,16 @@ void TurnOffAutoSignin(PrefService* prefs) {
bool ShouldShowChromeSignInPasswordPromo(
PrefService* prefs,
const syncer::SyncService* sync_service) {
- // Query the group first for correct UMA reporting.
- std::string param = variations::GetVariationParamValue(
- kChromeSignInPasswordPromoExperimentName,
- kChromeSignInPasswordPromoThresholdParam);
if (!sync_service || !sync_service->IsSyncAllowed() ||
sync_service->IsFirstSetupComplete())
return false;
- int threshold = 0;
- return base::StringToInt(param, &threshold) &&
- !prefs->GetBoolean(
+ // Don't show the promo more than 3 times.
+ constexpr int kThreshold = 3;
+ return !prefs->GetBoolean(
password_manager::prefs::kWasSignInPasswordPromoClicked) &&
prefs->GetInteger(
password_manager::prefs::kNumberSignInPasswordPromoShown) <
- threshold;
+ kThreshold;
}
} // namespace password_bubble_experiment

Powered by Google App Engine
This is Rietveld 408576698