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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Experiment to add bank name in autofill ui. Created 3 years, 6 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/string16.h" 10 #include "base/strings/string16.h"
(...skipping 11 matching lines...) Expand all
22 #include "components/variations/variations_associated_data.h" 22 #include "components/variations/variations_associated_data.h"
23 #include "google_apis/gaia/gaia_auth_util.h" 23 #include "google_apis/gaia/gaia_auth_util.h"
24 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
25 25
26 namespace autofill { 26 namespace autofill {
27 27
28 const base::Feature kAutofillCreditCardAssist{ 28 const base::Feature kAutofillCreditCardAssist{
29 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT}; 29 "AutofillCreditCardAssist", base::FEATURE_DISABLED_BY_DEFAULT};
30 const base::Feature kAutofillScanCardholderName{ 30 const base::Feature kAutofillScanCardholderName{
31 "AutofillScanCardholderName", base::FEATURE_DISABLED_BY_DEFAULT}; 31 "AutofillScanCardholderName", base::FEATURE_DISABLED_BY_DEFAULT};
32 const base::Feature kAutofillCreditCardBankNameDisplay{
33 "AutofillCreditCardBankNameDisplay", base::FEATURE_DISABLED_BY_DEFAULT};
32 const base::Feature kAutofillCreditCardPopupLayout{ 34 const base::Feature kAutofillCreditCardPopupLayout{
33 "AutofillCreditCardPopupLayout", base::FEATURE_DISABLED_BY_DEFAULT}; 35 "AutofillCreditCardPopupLayout", base::FEATURE_DISABLED_BY_DEFAULT};
34 const base::Feature kAutofillCreditCardLastUsedDateDisplay{ 36 const base::Feature kAutofillCreditCardLastUsedDateDisplay{
35 "AutofillCreditCardLastUsedDateDisplay", base::FEATURE_DISABLED_BY_DEFAULT}; 37 "AutofillCreditCardLastUsedDateDisplay", base::FEATURE_DISABLED_BY_DEFAULT};
36 const base::Feature kAutofillOfferLocalSaveIfServerCardManuallyEntered{ 38 const base::Feature kAutofillOfferLocalSaveIfServerCardManuallyEntered{
37 "AutofillOfferLocalSaveIfServerCardManuallyEntered", 39 "AutofillOfferLocalSaveIfServerCardManuallyEntered",
38 base::FEATURE_DISABLED_BY_DEFAULT}; 40 base::FEATURE_DISABLED_BY_DEFAULT};
39 const base::Feature kAutofillUpstreamRequestCvcIfMissing{ 41 const base::Feature kAutofillUpstreamRequestCvcIfMissing{
40 "AutofillUpstreamRequestCvcIfMissing", base::FEATURE_DISABLED_BY_DEFAULT}; 42 "AutofillUpstreamRequestCvcIfMissing", base::FEATURE_DISABLED_BY_DEFAULT};
41 const base::Feature kAutofillUpstreamUseAutofillProfileComparator{ 43 const base::Feature kAutofillUpstreamUseAutofillProfileComparator{
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 96 }
95 97
96 bool IsAutofillCreditCardPopupLayoutExperimentEnabled() { 98 bool IsAutofillCreditCardPopupLayoutExperimentEnabled() {
97 return base::FeatureList::IsEnabled(kAutofillCreditCardPopupLayout); 99 return base::FeatureList::IsEnabled(kAutofillCreditCardPopupLayout);
98 } 100 }
99 101
100 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() { 102 bool IsAutofillCreditCardLastUsedDateDisplayExperimentEnabled() {
101 return base::FeatureList::IsEnabled(kAutofillCreditCardLastUsedDateDisplay); 103 return base::FeatureList::IsEnabled(kAutofillCreditCardLastUsedDateDisplay);
102 } 104 }
103 105
106 bool IsAutofillCreditCardBankNameDisplayExperimentEnabled() {
107 return base::FeatureList::IsEnabled(kAutofillCreditCardBankNameDisplay);
108 }
109
104 // |GetCreditCardPopupParameterUintValue| returns 0 if experiment parameter is 110 // |GetCreditCardPopupParameterUintValue| returns 0 if experiment parameter is
105 // not specified. 0 == |SK_ColorTRANSPARENT|. 111 // not specified. 0 == |SK_ColorTRANSPARENT|.
106 SkColor GetCreditCardPopupBackgroundColor() { 112 SkColor GetCreditCardPopupBackgroundColor() {
107 return GetCreditCardPopupParameterUintValue( 113 return GetCreditCardPopupParameterUintValue(
108 kAutofillCreditCardPopupBackgroundColorKey); 114 kAutofillCreditCardPopupBackgroundColorKey);
109 } 115 }
110 116
111 SkColor GetCreditCardPopupDividerColor() { 117 SkColor GetCreditCardPopupDividerColor() {
112 return GetCreditCardPopupParameterUintValue( 118 return GetCreditCardPopupParameterUintValue(
113 kAutofillCreditCardPopupDividerColorKey); 119 kAutofillCreditCardPopupDividerColorKey);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 int value; 260 int value;
255 const std::string param_value = variations::GetVariationParamValueByFeature( 261 const std::string param_value = variations::GetVariationParamValueByFeature(
256 kAutofillUpstreamUseNotRecentlyUsedAutofillProfile, 262 kAutofillUpstreamUseNotRecentlyUsedAutofillProfile,
257 kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey); 263 kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey);
258 if (!param_value.empty() && base::StringToInt(param_value, &value)) 264 if (!param_value.empty() && base::StringToInt(param_value, &value))
259 return base::TimeDelta::FromMinutes(value); 265 return base::TimeDelta::FromMinutes(value);
260 return base::TimeDelta(); 266 return base::TimeDelta();
261 } 267 }
262 268
263 } // namespace autofill 269 } // 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