OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 namespace autofill { | 23 namespace autofill { |
24 | 24 |
25 struct Suggestion; | 25 struct Suggestion; |
26 | 26 |
27 extern const base::Feature kAutofillCreditCardAssist; | 27 extern const base::Feature kAutofillCreditCardAssist; |
28 extern const base::Feature kAutofillScanCardholderName; | 28 extern const base::Feature kAutofillScanCardholderName; |
29 extern const base::Feature kAutofillCreditCardPopupLayout; | 29 extern const base::Feature kAutofillCreditCardPopupLayout; |
30 extern const base::Feature kAutofillCreditCardLastUsedDateDisplay; | 30 extern const base::Feature kAutofillCreditCardLastUsedDateDisplay; |
| 31 extern const base::Feature kAutofillCreditCardBankNameDisplay; |
31 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; | 32 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; |
32 extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[]; | 33 extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[]; |
33 extern const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[]; | 34 extern const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[]; |
34 | 35 |
35 // Returns true if autofill should be enabled. See also | 36 // Returns true if autofill should be enabled. See also |
36 // IsInAutofillSuggestionsDisabledExperiment below. | 37 // IsInAutofillSuggestionsDisabledExperiment below. |
37 bool IsAutofillEnabled(const PrefService* pref_service); | 38 bool IsAutofillEnabled(const PrefService* pref_service); |
38 | 39 |
39 // Returns true if autofill suggestions are disabled via experiment. The | 40 // Returns true if autofill suggestions are disabled via experiment. The |
40 // disabled experiment isn't the same as disabling autofill completely since we | 41 // disabled experiment isn't the same as disabling autofill completely since we |
(...skipping 20 matching lines...) Expand all Loading... |
61 // enabled. | 62 // enabled. |
62 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); | 63 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); |
63 | 64 |
64 // Returns whether Autofill credit card last used date display experiment is | 65 // Returns whether Autofill credit card last used date display experiment is |
65 // enabled. | 66 // enabled. |
66 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); | 67 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); |
67 | 68 |
68 // Returns whether Autofill credit card last used date shows expiration date. | 69 // Returns whether Autofill credit card last used date shows expiration date. |
69 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); | 70 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); |
70 | 71 |
| 72 // Returns whether Autofill credit card bank name display experiment is enabled. |
| 73 bool IsAutofillCreditCardBankNameDisplayExperimentEnabled(); |
| 74 |
71 // Returns the background color for credit card autofill popup, or | 75 // Returns the background color for credit card autofill popup, or |
72 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 76 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
73 // is not enabled. | 77 // is not enabled. |
74 SkColor GetCreditCardPopupBackgroundColor(); | 78 SkColor GetCreditCardPopupBackgroundColor(); |
75 | 79 |
76 // Returns the divider color for credit card autofill popup, or | 80 // Returns the divider color for credit card autofill popup, or |
77 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 81 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
78 // is not enabled. | 82 // is not enabled. |
79 SkColor GetCreditCardPopupDividerColor(); | 83 SkColor GetCreditCardPopupDividerColor(); |
80 | 84 |
(...skipping 15 matching lines...) Expand all Loading... |
96 void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion); | 100 void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion); |
97 | 101 |
98 // Returns the margin for the icon, label and between icon and label. Returns 0 | 102 // Returns the margin for the icon, label and between icon and label. Returns 0 |
99 // if the margin isn't configured in an experiment to tweak autofill popup | 103 // if the margin isn't configured in an experiment to tweak autofill popup |
100 // layout. | 104 // layout. |
101 unsigned int GetPopupMargin(); | 105 unsigned int GetPopupMargin(); |
102 | 106 |
103 } // namespace autofill | 107 } // namespace autofill |
104 | 108 |
105 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 109 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
OLD | NEW |