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[]; |
39 extern const char kAutofillCreditCardBankNameDisplayInTitle[]; | |
sebsg
2017/06/12 21:17:00
Is this used?
Shanfeng
2017/06/12 23:34:58
No. Removed.
| |
38 | 40 |
39 // Returns true if autofill should be enabled. See also | 41 // Returns true if autofill should be enabled. See also |
40 // IsInAutofillSuggestionsDisabledExperiment below. | 42 // IsInAutofillSuggestionsDisabledExperiment below. |
41 bool IsAutofillEnabled(const PrefService* pref_service); | 43 bool IsAutofillEnabled(const PrefService* pref_service); |
42 | 44 |
43 // Returns true if autofill suggestions are disabled via experiment. The | 45 // Returns true if autofill suggestions are disabled via experiment. The |
44 // disabled experiment isn't the same as disabling autofill completely since we | 46 // disabled experiment isn't the same as disabling autofill completely since we |
45 // still want to run detection code for metrics purposes. This experiment just | 47 // still want to run detection code for metrics purposes. This experiment just |
46 // disables providing suggestions. | 48 // disables providing suggestions. |
47 bool IsInAutofillSuggestionsDisabledExperiment(); | 49 bool IsInAutofillSuggestionsDisabledExperiment(); |
(...skipping 17 matching lines...) Expand all Loading... | |
65 // enabled. | 67 // enabled. |
66 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); | 68 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); |
67 | 69 |
68 // Returns whether Autofill credit card last used date display experiment is | 70 // Returns whether Autofill credit card last used date display experiment is |
69 // enabled. | 71 // enabled. |
70 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); | 72 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); |
71 | 73 |
72 // Returns whether Autofill credit card last used date shows expiration date. | 74 // Returns whether Autofill credit card last used date shows expiration date. |
73 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); | 75 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); |
74 | 76 |
77 // Returns whether Autofill credit card bank name display experiment is enabled. | |
78 bool IsAutofillCreditCardBankNameDisplayExperimentEnabled(); | |
79 | |
75 // Returns the background color for credit card autofill popup, or | 80 // Returns the background color for credit card autofill popup, or |
76 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 81 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
77 // is not enabled. | 82 // is not enabled. |
78 SkColor GetCreditCardPopupBackgroundColor(); | 83 SkColor GetCreditCardPopupBackgroundColor(); |
79 | 84 |
80 // Returns the divider color for credit card autofill popup, or | 85 // Returns the divider color for credit card autofill popup, or |
81 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 86 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
82 // is not enabled. | 87 // is not enabled. |
83 SkColor GetCreditCardPopupDividerColor(); | 88 SkColor GetCreditCardPopupDividerColor(); |
84 | 89 |
(...skipping 24 matching lines...) Expand all Loading... | |
109 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled(); | 114 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled(); |
110 | 115 |
111 // Returns the maximum time that could have elapsed since an address profile's | 116 // 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 | 117 // 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. | 118 // for card upload. Returns 0 if the experiment is not enabled. |
114 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload(); | 119 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload(); |
115 | 120 |
116 } // namespace autofill | 121 } // namespace autofill |
117 | 122 |
118 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 123 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
OLD | NEW |