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

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

Issue 2874933008: Adds animation as feature variation to keyboard accessory. (Closed)
Patch Set: Switch to base/metrics/field_trial_params.h API from variations:: 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 (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 21 matching lines...) Expand all
32 #include "chrome/browser/prerender/prerender_field_trial.h" 32 #include "chrome/browser/prerender/prerender_field_trial.h"
33 #include "chrome/common/channel_info.h" 33 #include "chrome/common/channel_info.h"
34 #include "chrome/common/chrome_content_client.h" 34 #include "chrome/common/chrome_content_client.h"
35 #include "chrome/common/chrome_features.h" 35 #include "chrome/common/chrome_features.h"
36 #include "chrome/common/chrome_switches.h" 36 #include "chrome/common/chrome_switches.h"
37 #include "chrome/common/features.h" 37 #include "chrome/common/features.h"
38 #include "chrome/common/pause_tabs_field_trial.h" 38 #include "chrome/common/pause_tabs_field_trial.h"
39 #include "chrome/grit/chromium_strings.h" 39 #include "chrome/grit/chromium_strings.h"
40 #include "components/autofill/core/browser/autofill_experiments.h" 40 #include "components/autofill/core/browser/autofill_experiments.h"
41 #include "components/autofill/core/common/autofill_switches.h" 41 #include "components/autofill/core/common/autofill_switches.h"
42 #include "components/autofill/core/common/autofill_util.h"
42 #include "components/browser_sync/browser_sync_switches.h" 43 #include "components/browser_sync/browser_sync_switches.h"
43 #include "components/cloud_devices/common/cloud_devices_switches.h" 44 #include "components/cloud_devices/common/cloud_devices_switches.h"
44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_featu res.h" 45 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_featu res.h"
45 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 46 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
46 #include "components/dom_distiller/core/dom_distiller_switches.h" 47 #include "components/dom_distiller/core/dom_distiller_switches.h"
47 #include "components/error_page/common/error_page_switches.h" 48 #include "components/error_page/common/error_page_switches.h"
48 #include "components/flags_ui/feature_entry.h" 49 #include "components/flags_ui/feature_entry.h"
49 #include "components/flags_ui/feature_entry_macros.h" 50 #include "components/flags_ui/feature_entry_macros.h"
50 #include "components/flags_ui/flags_storage.h" 51 #include "components/flags_ui/flags_storage.h"
51 #include "components/flags_ui/flags_ui_switches.h" 52 #include "components/flags_ui/flags_ui_switches.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 nullptr}, 837 nullptr},
837 {"Increase dropdown item height", 838 {"Increase dropdown item height",
838 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight, 839 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight,
839 arraysize( 840 arraysize(
840 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight), 841 kAutofillCreditCardPopupLayoutFeatureVariationDropdownItemHeight),
841 nullptr}, 842 nullptr},
842 {"Display credit card icon at start and increase dropdown item height", 843 {"Display credit card icon at start and increase dropdown item height",
843 kAutofillCreditCardPopupLayoutFeatureVariationExpanded, 844 kAutofillCreditCardPopupLayoutFeatureVariationExpanded,
844 arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded), 845 arraysize(kAutofillCreditCardPopupLayoutFeatureVariationExpanded),
845 nullptr}}; 846 nullptr}};
847
848 const FeatureEntry::FeatureParam
849 kAutofillKeyboardAccessoryFeatureVariationAnimationDuration[] = {
850 {autofill::kAutofillKeyboardAccessoryAnimationDurationKey, "1000"}};
851
852 const FeatureEntry::FeatureParam
853 kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth[] = {
854 {autofill::kAutofillKeyboardAccessoryLimitLabelWidthKey, "true"}};
855
856 const FeatureEntry::FeatureParam
857 kAutofillKeyboardAccessoryFeatureVariationShowHint[] = {
858 {autofill::kAutofillKeyboardAccessoryHintKey, "true"}};
859
860 const FeatureEntry::FeatureParam
861 kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint[] = {
862 {autofill::kAutofillKeyboardAccessoryAnimationDurationKey, "1000"},
863 {autofill::kAutofillKeyboardAccessoryHintKey, "true"}};
864
865 const FeatureEntry::FeatureVariation
866 kAutofillKeyboardAccessoryFeatureVariations[] = {
867 {"Animate", kAutofillKeyboardAccessoryFeatureVariationAnimationDuration,
868 arraysize(kAutofillKeyboardAccessoryFeatureVariationAnimationDuration),
869 nullptr},
870 {"Limit label width",
871 kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth,
872 arraysize(kAutofillKeyboardAccessoryFeatureVariationLimitLabelWidth),
873 nullptr},
874 {"Show hint", kAutofillKeyboardAccessoryFeatureVariationShowHint,
875 arraysize(kAutofillKeyboardAccessoryFeatureVariationShowHint),
876 nullptr},
877 {"Animate with hint",
878 kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint,
879 arraysize(kAutofillKeyboardAccessoryFeatureVariationAnimateWithHint),
880 nullptr}};
846 #endif // OS_ANDROID 881 #endif // OS_ANDROID
847 882
848 const FeatureEntry::FeatureParam 883 const FeatureEntry::FeatureParam
849 kAutofillCreditCardLastUsedDateFeatureVariationExpDate[] = { 884 kAutofillCreditCardLastUsedDateFeatureVariationExpDate[] = {
850 {"show_expiration_date", "true"}}; 885 {"show_expiration_date", "true"}};
851 886
852 const FeatureEntry::FeatureVariation 887 const FeatureEntry::FeatureVariation
853 kAutofillCreditCardLastUsedDateFeatureVariations[] = { 888 kAutofillCreditCardLastUsedDateFeatureVariations[] = {
854 {"Display expiration date", 889 {"Display expiration date",
855 kAutofillCreditCardLastUsedDateFeatureVariationExpDate, 890 kAutofillCreditCardLastUsedDateFeatureVariationExpDate,
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 {"disable-mtp-write-support", flag_descriptions::kMtpWriteSupportName, 1978 {"disable-mtp-write-support", flag_descriptions::kMtpWriteSupportName,
1944 flag_descriptions::kMtpWriteSupportDescription, kOsCrOS, 1979 flag_descriptions::kMtpWriteSupportDescription, kOsCrOS,
1945 SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport)}, 1980 SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport)},
1946 #endif // OS_CHROMEOS 1981 #endif // OS_CHROMEOS
1947 #if defined(OS_CHROMEOS) 1982 #if defined(OS_CHROMEOS)
1948 {"enable-datasaver-prompt", flag_descriptions::kDatasaverPromptName, 1983 {"enable-datasaver-prompt", flag_descriptions::kDatasaverPromptName,
1949 flag_descriptions::kDatasaverPromptDescription, kOsCrOS, 1984 flag_descriptions::kDatasaverPromptDescription, kOsCrOS,
1950 MULTI_VALUE_TYPE(kDataSaverPromptChoices)}, 1985 MULTI_VALUE_TYPE(kDataSaverPromptChoices)},
1951 #endif // OS_CHROMEOS 1986 #endif // OS_CHROMEOS
1952 #if defined(OS_ANDROID) 1987 #if defined(OS_ANDROID)
1953 {"enable-autofill-keyboard-accessory-view", 1988 {"autofill-keyboard-accessory-view",
1954 flag_descriptions::kAutofillAccessoryViewName, 1989 flag_descriptions::kAutofillAccessoryViewName,
1955 flag_descriptions::kAutofillAccessoryViewDescription, kOsAndroid, 1990 flag_descriptions::kAutofillAccessoryViewDescription, kOsAndroid,
1956 ENABLE_DISABLE_VALUE_TYPE( 1991 FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::kAutofillKeyboardAccessory,
1957 autofill::switches::kEnableAccessorySuggestionView, 1992 kAutofillKeyboardAccessoryFeatureVariations,
1958 autofill::switches::kDisableAccessorySuggestionView)}, 1993 "AutofillKeyboardAccessoryVariations")},
1959 #endif // OS_ANDROID 1994 #endif // OS_ANDROID
1960 #if defined(OS_WIN) 1995 #if defined(OS_WIN)
1961 {"try-supported-channel-layouts", 1996 {"try-supported-channel-layouts",
1962 flag_descriptions::kTrySupportedChannelLayoutsName, 1997 flag_descriptions::kTrySupportedChannelLayoutsName,
1963 flag_descriptions::kTrySupportedChannelLayoutsDescription, kOsWin, 1998 flag_descriptions::kTrySupportedChannelLayoutsDescription, kOsWin,
1964 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts)}, 1999 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts)},
1965 #endif // OS_WIN 2000 #endif // OS_WIN
1966 #if defined(OS_MACOSX) 2001 #if defined(OS_MACOSX)
1967 {"app-info-dialog", flag_descriptions::kAppInfoDialogName, 2002 {"app-info-dialog", flag_descriptions::kAppInfoDialogName,
1968 flag_descriptions::kAppInfoDialogDescription, kOsMac, 2003 flag_descriptions::kAppInfoDialogDescription, kOsMac,
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3173 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3139 3174
3140 const FeatureEntry* GetFeatureEntries(size_t* count) { 3175 const FeatureEntry* GetFeatureEntries(size_t* count) {
3141 *count = arraysize(kFeatureEntries); 3176 *count = arraysize(kFeatureEntries);
3142 return kFeatureEntries; 3177 return kFeatureEntries;
3143 } 3178 }
3144 3179
3145 } // namespace testing 3180 } // namespace testing
3146 3181
3147 } // namespace about_flags 3182 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698