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

Unified Diff: components/autofill/core/browser/autofill_experiments.h

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Fixes compile error. 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/autofill/core/browser/autofill_experiments.h
diff --git a/components/autofill/core/browser/autofill_experiments.h b/components/autofill/core/browser/autofill_experiments.h
index 9fe4fc0b55631195de8afbfd5b1ddc999e4391ea..fc02866e1643ee97a3dd33d958cb89e534728bf2 100644
--- a/components/autofill/core/browser/autofill_experiments.h
+++ b/components/autofill/core/browser/autofill_experiments.h
@@ -7,6 +7,9 @@
#include <string>
+#include "base/strings/string16.h"
+#include "third_party/skia/include/core/SkColor.h"
+
class PrefService;
namespace base {
@@ -19,11 +22,15 @@ class SyncService;
namespace autofill {
+struct Suggestion;
+
extern const base::Feature kAutofillCreditCardAssist;
extern const base::Feature kAutofillCreditCardSigninPromo;
extern const base::Feature kAutofillProfileCleanup;
extern const base::Feature kAutofillScanCardholderName;
+extern const base::Feature kAutofillCreditCardPopupLayout;
extern const char kCreditCardSigninPromoImpressionLimitParamKey[];
+extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[];
// Returns true if autofill should be enabled. See also
// IsInAutofillSuggestionsDisabledExperiment below.
@@ -64,6 +71,37 @@ bool IsCreditCardUploadEnabled(const PrefService* pref_service,
// in the autofill dropdown when credit card fields are on an HTTP page.
bool IsCreditCardAutofillHttpWarningEnabled();
+// Returns whether the new Autofill credit card popup layout experiment is
+// enabled.
+bool IsAutofillCreditCardPopupLayoutExperimentEnabled();
+
+// Returns the background color for credit card autofill popup, or
+// |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment
+// is not enabled.
+SkColor GetCreditCardPopupBackgroundColor();
+
+// Returns the divider color for credit card autofill popup, or
+// |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment
+// is not enabled.
+SkColor GetCreditCardPopupDividerColor();
+
+// Returns true if the credit card autofill popup suggestion value is displayed
+// in bold type face.
+bool IsCreditCardPopupValueBold();
+
+// Returns the dropdown item height for autofill popup, returning 0 if the
+// dropdown item height isn't configured in an experiment to tweak autofill
+// popup layout.
+unsigned int GetPopupDropdownItemHeight();
+
+// Returns true if the icon in the credit card autofill popup must be displayed
+// before the credit card value or any other suggestion text.
+bool IsIconInCreditCardPopupAtStart();
+
+// Modifies the suggestion value and label if the new credit card autofill popup
+// experiment is enabled to tweak the display of the value and label.
+void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_

Powered by Google App Engine
This is Rietveld 408576698