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

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

Issue 2888633002: Revert of [Autofill] Enable Autofill UKM by default. (Closed)
Patch Set: Created 3 years, 7 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 15 matching lines...) Expand all
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 kAutofillCreditCardPopupLayout{ 32 const base::Feature kAutofillCreditCardPopupLayout{
33 "AutofillCreditCardPopupLayout", base::FEATURE_DISABLED_BY_DEFAULT}; 33 "AutofillCreditCardPopupLayout", base::FEATURE_DISABLED_BY_DEFAULT};
34 const base::Feature kAutofillCreditCardLastUsedDateDisplay{ 34 const base::Feature kAutofillCreditCardLastUsedDateDisplay{
35 "AutofillCreditCardLastUsedDateDisplay", base::FEATURE_DISABLED_BY_DEFAULT}; 35 "AutofillCreditCardLastUsedDateDisplay", base::FEATURE_DISABLED_BY_DEFAULT};
36 const base::Feature kAutofillUkmLogging{"AutofillUkmLogging",
37 base::FEATURE_DISABLED_BY_DEFAULT};
36 const base::Feature kAutofillUpstreamRequestCvcIfMissing{ 38 const base::Feature kAutofillUpstreamRequestCvcIfMissing{
37 "AutofillUpstreamRequestCvcIfMissing", base::FEATURE_DISABLED_BY_DEFAULT}; 39 "AutofillUpstreamRequestCvcIfMissing", base::FEATURE_DISABLED_BY_DEFAULT};
38 const base::Feature kAutofillUpstreamUseAutofillProfileComparatorForName{ 40 const base::Feature kAutofillUpstreamUseAutofillProfileComparatorForName{
39 "AutofillUpstreamUseAutofillProfileComparatorForName", 41 "AutofillUpstreamUseAutofillProfileComparatorForName",
40 base::FEATURE_ENABLED_BY_DEFAULT}; 42 base::FEATURE_ENABLED_BY_DEFAULT};
41 const base::Feature kAutofillUpstreamUseNotRecentlyUsedAutofillProfile{ 43 const base::Feature kAutofillUpstreamUseNotRecentlyUsedAutofillProfile{
42 "AutofillUpstreamUseNotRecentlyUsedAutofillProfile", 44 "AutofillUpstreamUseNotRecentlyUsedAutofillProfile",
43 base::FEATURE_DISABLED_BY_DEFAULT}; 45 base::FEATURE_DISABLED_BY_DEFAULT};
44 const char kCreditCardSigninPromoImpressionLimitParamKey[] = "impression_limit"; 46 const char kCreditCardSigninPromoImpressionLimitParamKey[] = "impression_limit";
45 const char kAutofillCreditCardPopupBackgroundColorKey[] = "background_color"; 47 const char kAutofillCreditCardPopupBackgroundColorKey[] = "background_color";
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return true; 229 return true;
228 } 230 }
229 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 231 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
230 switches::kDisableOfferUploadCreditCards)) { 232 switches::kDisableOfferUploadCreditCards)) {
231 return false; 233 return false;
232 } 234 }
233 235
234 return !group_name.empty() && group_name != "Disabled"; 236 return !group_name.empty() && group_name != "Disabled";
235 } 237 }
236 238
239 bool IsUkmLoggingEnabled() {
240 return base::FeatureList::IsEnabled(kAutofillUkmLogging);
241 }
242
237 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled() { 243 bool IsAutofillUpstreamRequestCvcIfMissingExperimentEnabled() {
238 #if defined(OS_ANDROID) 244 #if defined(OS_ANDROID)
239 return false; 245 return false;
240 #else 246 #else
241 return base::FeatureList::IsEnabled(kAutofillUpstreamRequestCvcIfMissing); 247 return base::FeatureList::IsEnabled(kAutofillUpstreamRequestCvcIfMissing);
242 #endif 248 #endif
243 } 249 }
244 250
245 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload() { 251 base::TimeDelta GetMaxTimeSinceAutofillProfileUseForCardUpload() {
246 int value; 252 int value;
247 const std::string param_value = variations::GetVariationParamValueByFeature( 253 const std::string param_value = variations::GetVariationParamValueByFeature(
248 kAutofillUpstreamUseNotRecentlyUsedAutofillProfile, 254 kAutofillUpstreamUseNotRecentlyUsedAutofillProfile,
249 kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey); 255 kAutofillUpstreamMaxMinutesSinceAutofillProfileUseKey);
250 if (!param_value.empty() && base::StringToInt(param_value, &value)) 256 if (!param_value.empty() && base::StringToInt(param_value, &value))
251 return base::TimeDelta::FromMinutes(value); 257 return base::TimeDelta::FromMinutes(value);
252 return base::TimeDelta(); 258 return base::TimeDelta();
253 } 259 }
254 260
255 } // namespace autofill 261 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_experiments.h ('k') | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698