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

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

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Fixes compile error. Created 4 years 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h"
11 #include "third_party/skia/include/core/SkColor.h"
12
10 class PrefService; 13 class PrefService;
11 14
12 namespace base { 15 namespace base {
13 struct Feature; 16 struct Feature;
14 } 17 }
15 18
16 namespace syncer { 19 namespace syncer {
17 class SyncService; 20 class SyncService;
18 } 21 }
19 22
20 namespace autofill { 23 namespace autofill {
21 24
25 struct Suggestion;
26
22 extern const base::Feature kAutofillCreditCardAssist; 27 extern const base::Feature kAutofillCreditCardAssist;
23 extern const base::Feature kAutofillCreditCardSigninPromo; 28 extern const base::Feature kAutofillCreditCardSigninPromo;
24 extern const base::Feature kAutofillProfileCleanup; 29 extern const base::Feature kAutofillProfileCleanup;
25 extern const base::Feature kAutofillScanCardholderName; 30 extern const base::Feature kAutofillScanCardholderName;
31 extern const base::Feature kAutofillCreditCardPopupLayout;
26 extern const char kCreditCardSigninPromoImpressionLimitParamKey[]; 32 extern const char kCreditCardSigninPromoImpressionLimitParamKey[];
33 extern const char kAutofillCreditCardPopupSettingsSuggestionValueKey[];
27 34
28 // Returns true if autofill should be enabled. See also 35 // Returns true if autofill should be enabled. See also
29 // IsInAutofillSuggestionsDisabledExperiment below. 36 // IsInAutofillSuggestionsDisabledExperiment below.
30 bool IsAutofillEnabled(const PrefService* pref_service); 37 bool IsAutofillEnabled(const PrefService* pref_service);
31 38
32 // Returns true if autofill suggestions are disabled via experiment. The 39 // Returns true if autofill suggestions are disabled via experiment. The
33 // disabled experiment isn't the same as disabling autofill completely since we 40 // disabled experiment isn't the same as disabling autofill completely since we
34 // still want to run detection code for metrics purposes. This experiment just 41 // still want to run detection code for metrics purposes. This experiment just
35 // disables providing suggestions. 42 // disables providing suggestions.
36 bool IsInAutofillSuggestionsDisabledExperiment(); 43 bool IsInAutofillSuggestionsDisabledExperiment();
(...skipping 20 matching lines...) Expand all
57 // requires the appropriate flags and user settings to be true and the user to 64 // requires the appropriate flags and user settings to be true and the user to
58 // be a member of a supported domain. 65 // be a member of a supported domain.
59 bool IsCreditCardUploadEnabled(const PrefService* pref_service, 66 bool IsCreditCardUploadEnabled(const PrefService* pref_service,
60 const syncer::SyncService* sync_service, 67 const syncer::SyncService* sync_service,
61 const std::string& user_email); 68 const std::string& user_email);
62 69
63 // Returns true if the http warning switch is on, which will display a warning 70 // Returns true if the http warning switch is on, which will display a warning
64 // in the autofill dropdown when credit card fields are on an HTTP page. 71 // in the autofill dropdown when credit card fields are on an HTTP page.
65 bool IsCreditCardAutofillHttpWarningEnabled(); 72 bool IsCreditCardAutofillHttpWarningEnabled();
66 73
74 // Returns whether the new Autofill credit card popup layout experiment is
75 // enabled.
76 bool IsAutofillCreditCardPopupLayoutExperimentEnabled();
77
78 // Returns the background color for credit card autofill popup, or
79 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment
80 // is not enabled.
81 SkColor GetCreditCardPopupBackgroundColor();
82
83 // Returns the divider color for credit card autofill popup, or
84 // |SK_ColorTRANSPARENT| if the new credit card autofill popup layout experiment
85 // is not enabled.
86 SkColor GetCreditCardPopupDividerColor();
87
88 // Returns true if the credit card autofill popup suggestion value is displayed
89 // in bold type face.
90 bool IsCreditCardPopupValueBold();
91
92 // Returns the dropdown item height for autofill popup, returning 0 if the
93 // dropdown item height isn't configured in an experiment to tweak autofill
94 // popup layout.
95 unsigned int GetPopupDropdownItemHeight();
96
97 // Returns true if the icon in the credit card autofill popup must be displayed
98 // before the credit card value or any other suggestion text.
99 bool IsIconInCreditCardPopupAtStart();
100
101 // Modifies the suggestion value and label if the new credit card autofill popup
102 // experiment is enabled to tweak the display of the value and label.
103 void ModifyAutofillCreditCardSuggestion(struct Suggestion* suggestion);
104
67 } // namespace autofill 105 } // namespace autofill
68 106
69 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_ 107 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXPERIMENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698