Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: components/autofill/core/browser/autofill_experiments.cc

Issue 2257493004: Add "AutofillScanCardholderName" feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable feature by default Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/sync/driver/sync_service.h" 16 #include "components/sync/driver/sync_service.h"
17 #include "components/variations/variations_associated_data.h" 17 #include "components/variations/variations_associated_data.h"
18 #include "google_apis/gaia/gaia_auth_util.h" 18 #include "google_apis/gaia/gaia_auth_util.h"
19 19
20 namespace autofill { 20 namespace autofill {
21 21
22 const base::Feature kAutofillCreditCardAssist{ 22 const base::Feature kAutofillCreditCardAssist{
23 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT}; 23 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT};
24 const base::Feature kAutofillCreditCardSigninPromo{
25 "AutofillCreditCardSigninPromo", base::FEATURE_DISABLED_BY_DEFAULT};
24 const base::Feature kAutofillProfileCleanup{"AutofillProfileCleanup", 26 const base::Feature kAutofillProfileCleanup{"AutofillProfileCleanup",
25 base::FEATURE_DISABLED_BY_DEFAULT}; 27 base::FEATURE_DISABLED_BY_DEFAULT};
26 const base::Feature kAutofillCreditCardSigninPromo{ 28 const base::Feature kAutofillScanCardholderName{
27 "AutofillCreditCardSigninPromo", base::FEATURE_DISABLED_BY_DEFAULT}; 29 "AutofillScanCardholderName", base::FEATURE_DISABLED_BY_DEFAULT};
28 const char kCreditCardSigninPromoImpressionLimitParamKey[] = "impression_limit"; 30 const char kCreditCardSigninPromoImpressionLimitParamKey[] = "impression_limit";
29 31
30 bool IsAutofillEnabled(const PrefService* pref_service) { 32 bool IsAutofillEnabled(const PrefService* pref_service) {
31 return pref_service->GetBoolean(prefs::kAutofillEnabled); 33 return pref_service->GetBoolean(prefs::kAutofillEnabled);
32 } 34 }
33 35
34 bool IsInAutofillSuggestionsDisabledExperiment() { 36 bool IsInAutofillSuggestionsDisabledExperiment() {
35 std::string group_name = 37 std::string group_name =
36 base::FieldTrialList::FindFullName("AutofillEnabled"); 38 base::FieldTrialList::FindFullName("AutofillEnabled");
37 return group_name == "Disabled"; 39 return group_name == "Disabled";
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 135 }
134 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 136 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
135 switches::kDisableOfferUploadCreditCards)) { 137 switches::kDisableOfferUploadCreditCards)) {
136 return false; 138 return false;
137 } 139 }
138 140
139 return !group_name.empty() && group_name != "Disabled"; 141 return !group_name.empty() && group_name != "Disabled";
140 } 142 }
141 143
142 } // namespace autofill 144 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_experiments.h ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698