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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Added variations to show expiration date and detail time info Created 3 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight, 676 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight,
677 arraysize( 677 arraysize(
678 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight), 678 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight),
679 nullptr}, 679 nullptr},
680 {"Display credit card icon at start and increase dropdown item height", 680 {"Display credit card icon at start and increase dropdown item height",
681 kAutofillCreditCardPopupLayoutFeatureVariationExpanded, 681 kAutofillCreditCardPopupLayoutFeatureVariationExpanded,
682 arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded), 682 arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded),
683 nullptr}}; 683 nullptr}};
684 #endif // OS_ANDROID 684 #endif // OS_ANDROID
685 685
686 #if defined(OS_ANDROID)
687 const FeatureEntry::FeatureParam
688 kAutofillCreditCardLastUsedDateFeatureVariationExpDate[] = {
689 {"show_expiration_date", "true"}};
690
691 const FeatureEntry::FeatureParam
692 kAutofillCreditCardLastUsedDateFeatureVariationTimeDetail[] = {
693 {"show_time_detail", "true"}};
694
695 const FeatureEntry::FeatureParam
696 kAutofillCreditCardLastUsedDateFeatureVariationExpDateAndTimeDetail[] = {
697 {"show_expiration_date", "true"},
698 {"show_time_detail", "true"}};
699
700 const FeatureEntry::FeatureVariation
701 kAutofillCreditCardLastUsedDateFeatureVariations[] = {
702 {"Display expiration date",
703 kAutofillCreditCardLastUsedDateFeatureVariationExpDate,
704 arraysize(
705 kAutofillCreditCardLastUsedDateFeatureVariationExpDate),
706 nullptr},
707 {"Display time detail",
708 kAutofillCreditCardLastUsedDateFeatureVariationTimeDetail,
709 arraysize(
710 kAutofillCreditCardLastUsedDateFeatureVariationTimeDetail),
711 nullptr},
712 {"Display expiration date and time detail",
713 kAutofillCreditCardLastUsedDateFeatureVariationExpDateAndTimeDetail,
714 arraysize(
715 kAutofillCreditCardLastUsedDateFeatureVariationExpDateAndTimeDetail),
716 nullptr}};
717 #endif // OS_ANDROID
718
686 // RECORDING USER METRICS FOR FLAGS: 719 // RECORDING USER METRICS FOR FLAGS:
687 // ----------------------------------------------------------------------------- 720 // -----------------------------------------------------------------------------
688 // The first line of the entry is the internal name. 721 // The first line of the entry is the internal name.
689 // 722 //
690 // To add a new entry, add to the end of kFeatureEntries. There are two 723 // To add a new entry, add to the end of kFeatureEntries. There are two
691 // distinct types of entries: 724 // distinct types of entries:
692 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE 725 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
693 // macro for this type supplying the command line to the macro. 726 // macro for this type supplying the command line to the macro.
694 // . MULTI_VALUE: a list of choices, the first of which should correspond to a 727 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
695 // deactivated state for this lab (i.e. no command line option). To specify 728 // deactivated state for this lab (i.e. no command line option). To specify
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 #endif // defined(OS_CHROMEOS) 2199 #endif // defined(OS_CHROMEOS)
2167 2200
2168 #if defined(OS_ANDROID) 2201 #if defined(OS_ANDROID)
2169 {"enable-expanded-autofill-credit-card-popup", 2202 {"enable-expanded-autofill-credit-card-popup",
2170 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT, 2203 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT,
2171 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT_DESCRIPTION, 2204 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT_DESCRIPTION,
2172 kOsAndroid, FEATURE_WITH_VARIATIONS_VALUE_TYPE( 2205 kOsAndroid, FEATURE_WITH_VARIATIONS_VALUE_TYPE(
2173 autofill::kAutofillCreditCardPopupLayout, 2206 autofill::kAutofillCreditCardPopupLayout,
2174 kAutofillCreditCardPopupLayoutFeatureVariations, 2207 kAutofillCreditCardPopupLayoutFeatureVariations,
2175 "AutofillCreditCardPopupLayout")}, 2208 "AutofillCreditCardPopupLayout")},
2209 {"enable-autofill-credit-card-last-used-date-display",
2210 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_LAST_USED_DATE_DISPLAY,
2211 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_LAST_USED_DATE_DISPLAY_DESCRIPTION,
2212 kOsAndroid, FEATURE_WITH_VARIATIONS_VALUE_TYPE(
2213 autofill::kAutofillCreditCardLastUsedDateDisplay,
2214 kAutofillCreditCardLastUsedDateFeatureVariations,
2215 "AutofillCreditCardLastUsedDate")},
2176 {"native-android-history-manager", IDS_NATIVE_ANDROID_HISTORY_MANAGER, 2216 {"native-android-history-manager", IDS_NATIVE_ANDROID_HISTORY_MANAGER,
2177 IDS_NATIVE_ANDROID_HISTORY_MANAGER_DESCRIPTION, kOsAndroid, 2217 IDS_NATIVE_ANDROID_HISTORY_MANAGER_DESCRIPTION, kOsAndroid,
2178 FEATURE_VALUE_TYPE(chrome::android::kNativeAndroidHistoryManager)}, 2218 FEATURE_VALUE_TYPE(chrome::android::kNativeAndroidHistoryManager)},
2179 #endif // OS_ANDROID 2219 #endif // OS_ANDROID
2180 {"enable-faster-location-reload", IDS_FLAGS_FASTER_LOCATION_RELOAD_NAME, 2220 {"enable-faster-location-reload", IDS_FLAGS_FASTER_LOCATION_RELOAD_NAME,
2181 IDS_FLAGS_FASTER_LOCATION_RELOAD_DESCRIPTION, kOsAll, 2221 IDS_FLAGS_FASTER_LOCATION_RELOAD_DESCRIPTION, kOsAll,
2182 FEATURE_VALUE_TYPE(features::kFasterLocationReload)} 2222 FEATURE_VALUE_TYPE(features::kFasterLocationReload)}
2183 2223
2184 // NOTE: Adding new command-line switches requires adding corresponding 2224 // NOTE: Adding new command-line switches requires adding corresponding
2185 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2225 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2422 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2383 2423
2384 const FeatureEntry* GetFeatureEntries(size_t* count) { 2424 const FeatureEntry* GetFeatureEntries(size_t* count) {
2385 *count = arraysize(kFeatureEntries); 2425 *count = arraysize(kFeatureEntries);
2386 return kFeatureEntries; 2426 return kFeatureEntries;
2387 } 2427 }
2388 2428
2389 } // namespace testing 2429 } // namespace testing
2390 2430
2391 } // namespace about_flags 2431 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698