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

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

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Adds clarification for SkColor Created 4 years, 1 month 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..86d3cc44ca2aeef84d4f344eebd1c30931eb168d 100644
--- a/components/autofill/core/browser/autofill_experiments.h
+++ b/components/autofill/core/browser/autofill_experiments.h
@@ -7,6 +7,8 @@
#include <string>
+#include "base/strings/string16.h"
+
class PrefService;
namespace base {
@@ -19,11 +21,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 +70,38 @@ 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 0 if the new
+// credit card autofill popup layout experiment is not enabled.
+// TODO(csashi): The Get*Color functions should return SkColor. Temporarily
+// returning int to bypass the following lint error:
+// Illegal include: "third_party/skia/include/core/SkColor.h"
Mathieu 2016/11/30 21:27:35 Can you try adding a DEPS rule in components/autof
csashi 2016/12/01 01:13:43 Done.
+int GetCreditCardPopupBackgroundColor();
+
+// Returns the divider color for credit card autofill popup, or 0 if the new
+// credit card autofill popup layout experiment is not enabled.
+int 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 credit card autofill popup, returning
+// -1 if the dropdown item height isn't configured in an experiment to tweak
+// autofill popup layout.
+int GetCreditCardPopupDropdownItemHeight();
+
+// Returns true if the credit card icon in the autofill popup must be displayed
+// to the left of the credit card value.
+bool IsCreditCardIconInPopupAtLeft();
+
+// Modifies the suggestion label and value if the new credit card autofill popup
+// experiment is enabled.
+void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_

Powered by Google App Engine
This is Rietveld 408576698