| 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" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "components/autofill/core/common/autofill_pref_names.h" | 13 #include "components/autofill/core/common/autofill_pref_names.h" |
| 14 #include "components/autofill/core/common/autofill_switches.h" | 14 #include "components/autofill/core/common/autofill_switches.h" |
| 15 #include "components/prefs/pref_service.h" | 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/security_state/switches.h" |
| 16 #include "components/sync/driver/sync_service.h" | 17 #include "components/sync/driver/sync_service.h" |
| 17 #include "components/variations/variations_associated_data.h" | 18 #include "components/variations/variations_associated_data.h" |
| 18 #include "google_apis/gaia/gaia_auth_util.h" | 19 #include "google_apis/gaia/gaia_auth_util.h" |
| 19 | 20 |
| 20 namespace autofill { | 21 namespace autofill { |
| 21 | 22 |
| 22 const base::Feature kAutofillCreditCardAssist{ | 23 const base::Feature kAutofillCreditCardAssist{ |
| 23 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT}; | 24 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 24 const base::Feature kAutofillCreditCardSigninPromo{ | 25 const base::Feature kAutofillCreditCardSigninPromo{ |
| 25 "AutofillCreditCardSigninPromo", base::FEATURE_DISABLED_BY_DEFAULT}; | 26 "AutofillCreditCardSigninPromo", base::FEATURE_DISABLED_BY_DEFAULT}; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return true; | 135 return true; |
| 135 } | 136 } |
| 136 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 137 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 137 switches::kDisableOfferUploadCreditCards)) { | 138 switches::kDisableOfferUploadCreditCards)) { |
| 138 return false; | 139 return false; |
| 139 } | 140 } |
| 140 | 141 |
| 141 return !group_name.empty() && group_name != "Disabled"; | 142 return !group_name.empty() && group_name != "Disabled"; |
| 142 } | 143 } |
| 143 | 144 |
| 145 bool IsCreditCardAutofillHttpWarningEnabled() { |
| 146 std::string choice = |
| 147 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 148 security_state::switches::kMarkHttpAs); |
| 149 return choice == security_state::switches:: |
| 150 kMarkHttpWithPasswordsOrCcWithChipAndFormWarning; |
| 151 } |
| 152 |
| 144 } // namespace autofill | 153 } // namespace autofill |
| OLD | NEW |