| 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 #include "components/autofill/core/browser/autofill_experiments.h" | 5 #include "components/autofill/core/browser/autofill_experiments.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 bool IsAutofillProfileCleanupEnabled() { | 40 bool IsAutofillProfileCleanupEnabled() { |
| 41 return base::FeatureList::IsEnabled(kAutofillProfileCleanup); | 41 return base::FeatureList::IsEnabled(kAutofillProfileCleanup); |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool IsAutofillCreditCardSigninPromoEnabled() { | 44 bool IsAutofillCreditCardSigninPromoEnabled() { |
| 45 return base::FeatureList::IsEnabled(kAutofillCreditCardSigninPromo); | 45 return base::FeatureList::IsEnabled(kAutofillCreditCardSigninPromo); |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool IsAutofillCreditCardAssistEnabled() { | 48 bool IsAutofillCreditCardAssistEnabled() { |
| 49 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 50 return false; |
| 51 #else |
| 49 return base::FeatureList::IsEnabled(kAutofillCreditCardAssist); | 52 return base::FeatureList::IsEnabled(kAutofillCreditCardAssist); |
| 53 #endif |
| 50 } | 54 } |
| 51 | 55 |
| 52 int GetCreditCardSigninPromoImpressionLimit() { | 56 int GetCreditCardSigninPromoImpressionLimit() { |
| 53 int impression_limit; | 57 int impression_limit; |
| 54 std::string param_value = variations::GetVariationParamValueByFeature( | 58 std::string param_value = variations::GetVariationParamValueByFeature( |
| 55 kAutofillCreditCardSigninPromo, | 59 kAutofillCreditCardSigninPromo, |
| 56 kCreditCardSigninPromoImpressionLimitParamKey); | 60 kCreditCardSigninPromoImpressionLimitParamKey); |
| 57 if (!param_value.empty() && base::StringToInt(param_value, &impression_limit)) | 61 if (!param_value.empty() && base::StringToInt(param_value, &impression_limit)) |
| 58 return impression_limit; | 62 return impression_limit; |
| 59 | 63 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 133 } |
| 130 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 134 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 131 switches::kDisableOfferUploadCreditCards)) { | 135 switches::kDisableOfferUploadCreditCards)) { |
| 132 return false; | 136 return false; |
| 133 } | 137 } |
| 134 | 138 |
| 135 return !group_name.empty() && group_name != "Disabled"; | 139 return !group_name.empty() && group_name != "Disabled"; |
| 136 } | 140 } |
| 137 | 141 |
| 138 } // namespace autofill | 142 } // namespace autofill |
| OLD | NEW |