| 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 kAutofillCreditCardSigninPromo; | 28 extern const base::Feature kAutofillCreditCardSigninPromo; |
| 29 extern const base::Feature kAutofillScanCardholderName; | 29 extern const base::Feature kAutofillScanCardholderName; |
| 30 extern const base::Feature kAutofillCreditCardPopupLayout; | 30 extern const base::Feature kAutofillCreditCardPopupLayout; |
| 31 extern const base::Feature kAutofillCreditCardLastUsedDateDisplay; |
| 31 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; | 32 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; |
| 32 extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[]; | 33 extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[]; |
| 34 extern const char kAutofillCreditCardLastUsedDateShowExpirationDateKey[]; |
| 35 extern const char kAutofillCreditCardLastUsedDateShowTimeDetailKey[]; |
| 33 | 36 |
| 34 // Returns true if autofill should be enabled. See also | 37 // Returns true if autofill should be enabled. See also |
| 35 // IsInAutofillSuggestionsDisabledExperiment below. | 38 // IsInAutofillSuggestionsDisabledExperiment below. |
| 36 bool IsAutofillEnabled(const PrefService* pref_service); | 39 bool IsAutofillEnabled(const PrefService* pref_service); |
| 37 | 40 |
| 38 // Returns true if autofill suggestions are disabled via experiment. The | 41 // Returns true if autofill suggestions are disabled via experiment. The |
| 39 // disabled experiment isn't the same as disabling autofill completely since we | 42 // disabled experiment isn't the same as disabling autofill completely since we |
| 40 // still want to run detection code for metrics purposes. This experiment just | 43 // still want to run detection code for metrics purposes. This experiment just |
| 41 // disables providing suggestions. | 44 // disables providing suggestions. |
| 42 bool IsInAutofillSuggestionsDisabledExperiment(); | 45 bool IsInAutofillSuggestionsDisabledExperiment(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 60 // requires the appropriate flags and user settings to be true and the user to | 63 // requires the appropriate flags and user settings to be true and the user to |
| 61 // be a member of a supported domain. | 64 // be a member of a supported domain. |
| 62 bool IsCreditCardUploadEnabled(const PrefService* pref_service, | 65 bool IsCreditCardUploadEnabled(const PrefService* pref_service, |
| 63 const syncer::SyncService* sync_service, | 66 const syncer::SyncService* sync_service, |
| 64 const std::string& user_email); | 67 const std::string& user_email); |
| 65 | 68 |
| 66 // Returns whether the new Autofill credit card popup layout experiment is | 69 // Returns whether the new Autofill credit card popup layout experiment is |
| 67 // enabled. | 70 // enabled. |
| 68 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); | 71 bool IsAutofillCreditCardPopupLayoutExperimentEnabled(); |
| 69 | 72 |
| 73 // Returns whether Autofill credit card last used date display experiment is |
| 74 // enabled. |
| 75 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled(); |
| 76 |
| 77 // Returns whether Autofill credit card last used date shows expiration date. |
| 78 bool ShowExpirationDateInAutofillCreditCardLastUsedDate(); |
| 79 |
| 80 // Return whether Autofill credit card last used date shows time detail. |
| 81 bool ShowTimeDetailInAutofillCreditCardLastUsedDate(); |
| 82 |
| 70 // Returns the background color for credit card autofill popup, or | 83 // Returns the background color for credit card autofill popup, or |
| 71 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 84 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
| 72 // is not enabled. | 85 // is not enabled. |
| 73 SkColor GetCreditCardPopupBackgroundColor(); | 86 SkColor GetCreditCardPopupBackgroundColor(); |
| 74 | 87 |
| 75 // Returns the divider color for credit card autofill popup, or | 88 // Returns the divider color for credit card autofill popup, or |
| 76 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment | 89 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment |
| 77 // is not enabled. | 90 // is not enabled. |
| 78 SkColor GetCreditCardPopupDividerColor(); | 91 SkColor GetCreditCardPopupDividerColor(); |
| 79 | 92 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 90 // before the credit card value or any other suggestion text. | 103 // before the credit card value or any other suggestion text. |
| 91 bool IsIconInCreditCardPopupAtStart(); | 104 bool IsIconInCreditCardPopupAtStart(); |
| 92 | 105 |
| 93 // Modifies the suggestion value and label if the new credit card autofill popup | 106 // Modifies the suggestion value and label if the new credit card autofill popup |
| 94 // experiment is enabled to tweak the display of the value and label. | 107 // experiment is enabled to tweak the display of the value and label. |
| 95 void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion); | 108 void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion); |
| 96 | 109 |
| 97 } // namespace autofill | 110 } // namespace autofill |
| 98 | 111 |
| 99 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ | 112 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ |
| OLD | NEW |