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" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 | 13 |
14 class PrefService; | 14 class PrefService; |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 struct Feature; | 17 struct Feature; |
18 } | 18 } |
19 | 19 |
20 namespace syncer { | 20 namespace syncer { |
21 class SyncService; | 21 class SyncService; |
22 } | 22 } |
23 | 23 |
24 namespace autofill { | 24 namespace autofill { |
25 | 25 |
26 struct Suggestion; | 26 struct Suggestion; |
27 | 27 |
28 extern const base::Feature kAutofillCreditCardAssist; | 28 extern const base::Feature kAutofillCreditCardAssist; |
29 extern const base::Feature kAutofillScanCardholderName; | 29 extern const base::Feature kAutofillScanCardholderName; |
| 30 extern const base::Feature kAutofillCreditCardBankNameDisplay; |
30 extern const base::Feature kAutofillCreditCardPopupLayout; | 31 extern const base::Feature kAutofillCreditCardPopupLayout; |
31 extern const base::Feature kAutofillCreditCardLastUsedDateDisplay; | 32 extern const base::Feature kAutofillCreditCardLastUsedDateDisplay; |
32 extern const base::Feature kAutofillUpstreamRequestCvcIfMissing; | 33 extern const base::Feature kAutofillUpstreamRequestCvcIfMissing; |
33 extern const base::Feature kAutofillUpstreamUseAutofillProfileComparator; | 34 extern const base::Feature kAutofillUpstreamUseAutofillProfileComparator; |
34 extern const base::Feature kAutofillUpstreamUseNotRecentlyUsedAutofillProfile; | 35 extern const base::Feature kAutofillUpstreamUseNotRecentlyUsedAutofillProfile; |
35 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; | 36 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; |
36 extern const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[]; | 37 extern const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[]; |
37 extern const char kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey[]; | 38 extern const char kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey[]; |
38 | 39 |
39 // Returns true if autofill should be enabled. See also | 40 // Returns true if autofill should be enabled. See also |
(...skipping 25 matching lines...) Expand all Loading... |
65 // enabled. | 66 // enabled. |
66 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); | 67 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); |
67 | 68 |
68 // Returns whether Autofill credit card last used date display experiment is | 69 // Returns whether Autofill credit card last used date display experiment is |
69 // enabled. | 70 // enabled. |
70 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); | 71 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); |
71 | 72 |
72 // Returns whether Autofill credit card last used date shows expiration date. | 73 // Returns whether Autofill credit card last used date shows expiration date. |
73 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); | 74 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); |
74 | 75 |
| 76 // Returns whether Autofill credit card bank name display experiment is enabled. |
| 77 bool IsAutofillCreditCardBankNameDisplayExperimentEnabled(); |
| 78 |
75 // Returns the background color for credit card autofill popup, or | 79 // Returns the background color for credit card autofill popup, or |
76 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 80 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
77 // is not enabled. | 81 // is not enabled. |
78 SkColor GetCreditCardPopupBackgroundColor(); | 82 SkColor GetCreditCardPopupBackgroundColor(); |
79 | 83 |
80 // Returns the divider color for credit card autofill popup, or | 84 // Returns the divider color for credit card autofill popup, or |
81 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 85 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
82 // is not enabled. | 86 // is not enabled. |
83 SkColor GetCreditCardPopupDividerColor(); | 87 SkColor GetCreditCardPopupDividerColor(); |
84 | 88 |
(...skipping 24 matching lines...) Expand all Loading... |
109 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled(); | 113 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled(); |
110 | 114 |
111 // Returns the maximum time that could have elapsed since an address profile's | 115 // Returns the maximum time that could have elapsed since an address profile's |
112 // most recent use for the adress profile to be included in the candidate set | 116 // most recent use for the adress profile to be included in the candidate set |
113 // for card upload. Returns 0 if the experiment is not enabled. | 117 // for card upload. Returns 0 if the experiment is not enabled. |
114 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload(); | 118 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload(); |
115 | 119 |
116 } // namespace autofill | 120 } // namespace autofill |
117 | 121 |
118 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 122 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
OLD | NEW |