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

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

Issue 2212063002: [Autofill] Implement Autofill Assistant infobar for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ifdef Created 4 years, 4 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"
(...skipping 28 matching lines...) Expand all
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698