Commit 43e42e20 authored by sebsg's avatar sebsg Committed by Commit Bot

[Autofill] Add experiment for sticky/non-sticky Upstream bubble.

Bug: 822849

Change-Id: If2c0f615f4b9e610ca9ec745e081622efed1d887
Reviewed-on: https://chromium-review.googlesource.com/967081
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544025}
parent ad3585e2
...@@ -66,7 +66,10 @@ SaveCardBubbleViews::SaveCardBubbleViews(views::View* anchor_view, ...@@ -66,7 +66,10 @@ SaveCardBubbleViews::SaveCardBubbleViews(views::View* anchor_view,
: LocationBarBubbleDelegateView(anchor_view, anchor_point, web_contents), : LocationBarBubbleDelegateView(anchor_view, anchor_point, web_contents),
controller_(controller) { controller_(controller) {
DCHECK(controller); DCHECK(controller);
mouse_handler_ = std::make_unique<WebContentMouseHandler>(this, web_contents); if (IsAutofillAutoDismissableUpstreamBubbleExperimentEnabled()) {
mouse_handler_ =
std::make_unique<WebContentMouseHandler>(this, web_contents);
}
chrome::RecordDialogCreation(chrome::DialogIdentifier::SAVE_CARD); chrome::RecordDialogCreation(chrome::DialogIdentifier::SAVE_CARD);
} }
......
...@@ -26,6 +26,8 @@ namespace autofill { ...@@ -26,6 +26,8 @@ namespace autofill {
const base::Feature kAutofillAlwaysFillAddresses{ const base::Feature kAutofillAlwaysFillAddresses{
"AlwaysFillAddresses", base::FEATURE_ENABLED_BY_DEFAULT}; "AlwaysFillAddresses", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kAutofillAutoDismissableUpstreamBubble{
"AutofillAutoDismissableUpstreamBubble", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kAutofillCreateDataForTest{ const base::Feature kAutofillCreateDataForTest{
"AutofillCreateDataForTest", base::FEATURE_DISABLED_BY_DEFAULT}; "AutofillCreateDataForTest", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kAutofillCreditCardAssist{ const base::Feature kAutofillCreditCardAssist{
...@@ -119,6 +121,10 @@ bool IsAutofillCreditCardPopupLayoutExperimentEnabled() { ...@@ -119,6 +121,10 @@ bool IsAutofillCreditCardPopupLayoutExperimentEnabled() {
return base::FeatureList::IsEnabled(kAutofillCreditCardPopupLayout); return base::FeatureList::IsEnabled(kAutofillCreditCardPopupLayout);
} }
bool IsAutofillAutoDismissableUpstreamBubbleExperimentEnabled() {
return base::FeatureList::IsEnabled(kAutofillAutoDismissableUpstreamBubble);
}
bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() { bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() {
return base::FeatureList::IsEnabled(kAutofillCreditCardLastUsedDateDisplay); return base::FeatureList::IsEnabled(kAutofillCreditCardLastUsedDateDisplay);
} }
......
...@@ -26,6 +26,7 @@ namespace autofill { ...@@ -26,6 +26,7 @@ namespace autofill {
struct Suggestion; struct Suggestion;
extern const base::Feature kAutofillAlwaysFillAddresses; extern const base::Feature kAutofillAlwaysFillAddresses;
extern const base::Feature kAutofillAutoDismissableUpstreamBubble;
extern const base::Feature kAutofillCreateDataForTest; extern const base::Feature kAutofillCreateDataForTest;
extern const base::Feature kAutofillCreditCardAssist; extern const base::Feature kAutofillCreditCardAssist;
extern const base::Feature kAutofillScanCardholderName; extern const base::Feature kAutofillScanCardholderName;
...@@ -81,6 +82,10 @@ bool IsCreditCardUploadEnabled(const PrefService* pref_service, ...@@ -81,6 +82,10 @@ bool IsCreditCardUploadEnabled(const PrefService* pref_service,
// enabled. // enabled.
bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); bool IsAutofillCreditCardPopupLayoutExperimentEnabled();
// Returns whether the experiment to make the credit card Upstream bubble non
// sticky is enabled.
bool IsAutofillAutoDismissableUpstreamBubbleExperimentEnabled();
// Returns whether Autofill credit card last used date display experiment is // Returns whether Autofill credit card last used date display experiment is
// enabled. // enabled.
bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment