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 namespace base { | 10 namespace base { |
11 struct Feature; | 11 struct Feature; |
12 } | 12 } |
13 | 13 |
14 namespace sync_driver { | 14 namespace sync_driver { |
15 class SyncService; | 15 class SyncService; |
16 } | 16 } |
17 | 17 |
18 class PrefService; | 18 class PrefService; |
19 | 19 |
20 namespace autofill { | 20 namespace autofill { |
21 | 21 |
22 extern const base::Feature kAutofillProfileCleanup; | 22 extern const base::Feature kAutofillProfileCleanup; |
23 extern const base::Feature kAutofillCreditCardSigninPromo; | 23 extern const base::Feature kAutofillCreditCardSigninPromo; |
| 24 extern const base::Feature kAutofillCreditCardAssist; |
24 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; | 25 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; |
25 | 26 |
26 // Returns true if autofill should be enabled. See also | 27 // Returns true if autofill should be enabled. See also |
27 // IsInAutofillSuggestionsDisabledExperiment below. | 28 // IsInAutofillSuggestionsDisabledExperiment below. |
28 bool IsAutofillEnabled(const PrefService* pref_service); | 29 bool IsAutofillEnabled(const PrefService* pref_service); |
29 | 30 |
30 // Returns true if autofill suggestions are disabled via experiment. The | 31 // Returns true if autofill suggestions are disabled via experiment. The |
31 // disabled experiment isn't the same as disabling autofill completely since we | 32 // disabled experiment isn't the same as disabling autofill completely since we |
32 // still want to run detection code for metrics purposes. This experiment just | 33 // still want to run detection code for metrics purposes. This experiment just |
33 // disables providing suggestions. | 34 // disables providing suggestions. |
34 bool IsInAutofillSuggestionsDisabledExperiment(); | 35 bool IsInAutofillSuggestionsDisabledExperiment(); |
35 | 36 |
36 // Returns whether the Autofill profile cleanup feature is enabled. | 37 // Returns whether the Autofill profile cleanup feature is enabled. |
37 bool IsAutofillProfileCleanupEnabled(); | 38 bool IsAutofillProfileCleanupEnabled(); |
38 | 39 |
39 // Returns whether the Autofill credit card signin promo should be shown. | 40 // Returns whether the Autofill credit card signin promo should be shown. |
40 bool IsAutofillCreditCardSigninPromoEnabled(); | 41 bool IsAutofillCreditCardSigninPromoEnabled(); |
41 | 42 |
| 43 // Returns whether the Autofill credit card assist infobar should be shown. |
| 44 bool IsAutofillCreditCardAssistEnabled(); |
| 45 |
42 // Returns the maximum number of impressions of the credit card signin promo, or | 46 // Returns the maximum number of impressions of the credit card signin promo, or |
43 // 0 if there are no limits. | 47 // 0 if there are no limits. |
44 int GetCreditCardSigninPromoImpressionLimit(); | 48 int GetCreditCardSigninPromoImpressionLimit(); |
45 | 49 |
46 // Returns true if the user should be offered to locally store unmasked cards. | 50 // Returns true if the user should be offered to locally store unmasked cards. |
47 // This controls whether the option is presented at all rather than the default | 51 // This controls whether the option is presented at all rather than the default |
48 // response of the option. | 52 // response of the option. |
49 bool OfferStoreUnmaskedCards(); | 53 bool OfferStoreUnmaskedCards(); |
50 | 54 |
51 // Returns true if uploading credit cards to Wallet servers is enabled. This | 55 // Returns true if uploading credit cards to Wallet servers is enabled. This |
52 // requires the appropriate flags and user settings to be true and the user to | 56 // requires the appropriate flags and user settings to be true and the user to |
53 // be a member of a supported domain. | 57 // be a member of a supported domain. |
54 bool IsCreditCardUploadEnabled(const PrefService* pref_service, | 58 bool IsCreditCardUploadEnabled(const PrefService* pref_service, |
55 const sync_driver::SyncService* sync_service, | 59 const sync_driver::SyncService* sync_service, |
56 const std::string& user_email); | 60 const std::string& user_email); |
57 | 61 |
58 } // namespace autofill | 62 } // namespace autofill |
59 | 63 |
60 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 64 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
OLD | NEW |