[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 5 | #include "chrome/browser/about_flags.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 6 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 7 | #include <iterator> |
| 8 | #include <map> |
| 9 | #include <set> |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 10 | #include <utility> |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 11 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 12 | #include "base/command_line.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 13 | #include "base/memory/singleton.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 14 | #include "base/metrics/sparse_histogram.h" |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 15 | #include "base/stl_util.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 16 | #include "base/strings/string_number_conversions.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 17 | #include "base/strings/string_util.h" |
[email protected] | 135cb80 | 2013-06-09 16:44:20 | [diff] [blame] | 18 | #include "base/strings/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 19 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 20 | #include "cc/base/switches.h" |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 21 | #include "chrome/browser/flags_storage.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 22 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 23 | #include "chrome/common/chrome_switches.h" |
gburanov | fc88a24c | 2015-04-14 00:00:57 | [diff] [blame] | 24 | #include "chrome/grit/chromium_strings.h" |
[email protected] | af39f00 | 2014-08-22 10:18:18 | [diff] [blame] | 25 | #include "chrome/grit/generated_resources.h" |
gburanov | fc88a24c | 2015-04-14 00:00:57 | [diff] [blame] | 26 | #include "chrome/grit/google_chrome_strings.h" |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 27 | #include "components/autofill/core/common/autofill_switches.h" |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 28 | #include "components/cloud_devices/common/cloud_devices_switches.h" |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 29 | #include "components/dom_distiller/core/dom_distiller_switches.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 30 | #include "components/metrics/metrics_hashes.h" |
[email protected] | cbb22eb | 2013-06-24 23:53:10 | [diff] [blame] | 31 | #include "components/nacl/common/nacl_switches.h" |
dschuyler | 26d36874 | 2015-02-12 00:18:24 | [diff] [blame] | 32 | #include "components/omnibox/omnibox_switches.h" |
dbeam | 155ac97 | 2015-04-20 15:34:48 | [diff] [blame] | 33 | #include "components/plugins/common/plugins_switches.h" |
isherman | 96bfc8d2 | 2014-11-06 00:42:46 | [diff] [blame] | 34 | #include "components/proximity_auth/switches.h" |
[email protected] | 720b1049 | 2014-07-23 08:48:40 | [diff] [blame] | 35 | #include "components/search/search_switches.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 36 | #include "content/public/browser/user_metrics.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 37 | #include "media/base/media_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 38 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 39 | #include "ui/base/ui_base_switches.h" |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 40 | #include "ui/display/display_switches.h" |
[email protected] | a6147a2 | 2013-09-26 06:55:09 | [diff] [blame] | 41 | #include "ui/events/event_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 42 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 43 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 44 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | e3d512a7 | 2014-03-18 20:50:47 | [diff] [blame] | 45 | #include "ui/native_theme/native_theme_switches.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 46 | #include "ui/views/views_switches.h" |
[email protected] | 9a22457 | 2013-05-12 23:08:56 | [diff] [blame] | 47 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 48 | #if defined(OS_ANDROID) |
| 49 | #include "chrome/common/chrome_version_info.h" |
megjablon | 3476e04 | 2014-10-14 19:21:59 | [diff] [blame] | 50 | #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 51 | #else |
| 52 | #include "ui/message_center/message_center_switches.h" |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 53 | #endif |
| 54 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 55 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 56 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 57 | #endif |
| 58 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 59 | #if defined(OS_CHROMEOS) |
| 60 | #include "chromeos/chromeos_switches.h" |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 61 | #include "third_party/cros_system_api/switches/chrome_switches.h" |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 62 | #endif |
| 63 | |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 64 | #if defined(ENABLE_APP_LIST) |
| 65 | #include "ui/app_list/app_list_switches.h" |
| 66 | #endif |
| 67 | |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 68 | #if defined(ENABLE_EXTENSIONS) |
| 69 | #include "extensions/common/switches.h" |
| 70 | #endif |
| 71 | |
alexst | 24a14a32 | 2015-03-10 21:06:09 | [diff] [blame] | 72 | #if defined(USE_OZONE) |
| 73 | #include "ui/ozone/public/ozone_switches.h" |
| 74 | #endif |
| 75 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 76 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 77 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 78 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 79 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 80 | Experiment::SINGLE_VALUE, \ |
| 81 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 82 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 83 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 84 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 85 | disable_switch, disable_value) \ |
| 86 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 87 | disable_switch, disable_value, NULL, 3 |
| 88 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 89 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 90 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 91 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 92 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 93 | namespace { |
| 94 | |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 95 | // Enumeration of OSs. |
| 96 | enum { |
| 97 | kOsMac = 1 << 0, |
| 98 | kOsWin = 1 << 1, |
| 99 | kOsLinux = 1 << 2, |
| 100 | kOsCrOS = 1 << 3, |
| 101 | kOsAndroid = 1 << 4, |
| 102 | kOsCrOSOwnerOnly = 1 << 5 |
| 103 | }; |
| 104 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 105 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 106 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 107 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 108 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 109 | // whether the experiment is available on that platform. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 110 | void AddOsStrings(unsigned bitmask, base::ListValue* list) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 111 | struct { |
| 112 | unsigned bit; |
| 113 | const char* const name; |
| 114 | } kBitsToOs[] = { |
| 115 | {kOsMac, "Mac"}, |
| 116 | {kOsWin, "Windows"}, |
| 117 | {kOsLinux, "Linux"}, |
| 118 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 119 | {kOsAndroid, "Android"}, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 120 | {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 121 | }; |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 122 | for (size_t i = 0; i < arraysize(kBitsToOs); ++i) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 123 | if (bitmask & kBitsToOs[i].bit) |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 124 | list->Append(new base::StringValue(kBitsToOs[i].name)); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 125 | } |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 126 | } |
| 127 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 128 | // Convert switch constants to proper CommandLine::StringType strings. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 129 | base::CommandLine::StringType GetSwitchString(const std::string& flag) { |
| 130 | base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 131 | cmd_line.AppendSwitch(flag); |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 132 | DCHECK_EQ(2U, cmd_line.argv().size()); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 133 | return cmd_line.argv()[1]; |
| 134 | } |
| 135 | |
| 136 | // Scoops flags from a command line. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 137 | std::set<base::CommandLine::StringType> ExtractFlagsFromCommandLine( |
| 138 | const base::CommandLine& cmdline) { |
| 139 | std::set<base::CommandLine::StringType> flags; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 140 | // First do the ones between --flag-switches-begin and --flag-switches-end. |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 141 | base::CommandLine::StringVector::const_iterator first = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 142 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 143 | GetSwitchString(switches::kFlagSwitchesBegin)); |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 144 | base::CommandLine::StringVector::const_iterator last = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 145 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 146 | GetSwitchString(switches::kFlagSwitchesEnd)); |
| 147 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 148 | flags.insert(first + 1, last); |
| 149 | #if defined(OS_CHROMEOS) |
| 150 | // Then add those between --policy-switches-begin and --policy-switches-end. |
| 151 | first = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 152 | GetSwitchString(chromeos::switches::kPolicySwitchesBegin)); |
| 153 | last = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 154 | GetSwitchString(chromeos::switches::kPolicySwitchesEnd)); |
| 155 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 156 | flags.insert(first + 1, last); |
| 157 | #endif |
| 158 | return flags; |
| 159 | } |
| 160 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 161 | const Experiment::Choice kTouchEventsChoices[] = { |
| 162 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 163 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 164 | switches::kTouchEvents, |
| 165 | switches::kTouchEventsEnabled }, |
| 166 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 167 | switches::kTouchEvents, |
| 168 | switches::kTouchEventsDisabled } |
| 169 | }; |
| 170 | |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 171 | #if defined(USE_AURA) |
| 172 | const Experiment::Choice kOverscrollHistoryNavigationChoices[] = { |
| 173 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, |
| 174 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 175 | switches::kOverscrollHistoryNavigation, |
| 176 | "0" }, |
| 177 | { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, |
| 178 | switches::kOverscrollHistoryNavigation, |
| 179 | "2" } |
| 180 | }; |
| 181 | #endif |
| 182 | |
mfomitchev | 5ad034ec | 2015-04-24 21:57:27 | [diff] [blame] | 183 | const Experiment::Choice kTouchTextSelectionStrategyChoices[] = { |
| 184 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 185 | { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER, |
| 186 | switches::kTouchTextSelectionStrategy, |
| 187 | "character" }, |
| 188 | { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION, |
| 189 | switches::kTouchTextSelectionStrategy, |
| 190 | "direction" } |
| 191 | }; |
| 192 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 193 | #if !defined(DISABLE_NACL) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 194 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 195 | // Secure shell can be used on ChromeOS for forwarding the TCP port opened by |
[email protected] | 402bed6e | 2014-03-07 08:33:09 | [diff] [blame] | 196 | // debug stub to a remote machine. Since secure shell uses NaCl, we usually |
| 197 | // want to avoid debugging that. The PNaCl translator is also a NaCl module, |
| 198 | // so by default we want to avoid debugging that. |
| 199 | // NOTE: As the default value must be the empty string, the mask excluding |
| 200 | // the PNaCl translator and secure shell is substituted elsewhere. |
| 201 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 202 | { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 203 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 204 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 205 | }; |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 206 | #endif |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 207 | |
palmer | 601fe3c | 2015-01-23 20:43:02 | [diff] [blame] | 208 | const Experiment::Choice kMarkNonSecureAsChoices[] = { |
| 209 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 210 | { IDS_MARK_NON_SECURE_AS_NEUTRAL, |
| 211 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsNeutral}, |
| 212 | { IDS_MARK_NON_SECURE_AS_NON_SECURE, |
| 213 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsNonSecure}, |
| 214 | { IDS_MARK_NON_SECURE_AS_DUBIOUS, |
| 215 | switches::kMarkNonSecureAs, switches::kMarkNonSecureAsDubious} |
| 216 | }; |
| 217 | |
megjablon | 3bd89f3 | 2015-06-11 20:01:55 | [diff] [blame] | 218 | const Experiment::Choice kDataReductionProxyLoFiChoices[] = { |
| 219 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 220 | { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON, |
| 221 | data_reduction_proxy::switches::kDataReductionProxyLoFi, |
| 222 | data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn}, |
| 223 | { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY, |
| 224 | data_reduction_proxy::switches::kDataReductionProxyLoFi, |
| 225 | data_reduction_proxy::switches:: |
| 226 | kDataReductionProxyLoFiValueCellularOnly}, |
| 227 | { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED, |
| 228 | data_reduction_proxy::switches::kDataReductionProxyLoFi, |
| 229 | data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled} |
| 230 | }; |
| 231 | |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 232 | const Experiment::Choice kShowSavedCopyChoices[] = { |
| 233 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 234 | { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY, |
| 235 | switches::kShowSavedCopy, switches::kEnableShowSavedCopyPrimary }, |
| 236 | { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY, |
| 237 | switches::kShowSavedCopy, switches::kEnableShowSavedCopySecondary }, |
| 238 | { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY, |
| 239 | switches::kShowSavedCopy, switches::kDisableShowSavedCopy } |
| 240 | }; |
| 241 | |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 242 | const Experiment::Choice kDefaultTileWidthChoices[] = { |
| 243 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 244 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT, |
| 245 | switches::kDefaultTileWidth, "128"}, |
| 246 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL, |
| 247 | switches::kDefaultTileWidth, "256"}, |
| 248 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE, |
| 249 | switches::kDefaultTileWidth, "512"}, |
| 250 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI, |
| 251 | switches::kDefaultTileWidth, "1024"} |
| 252 | }; |
| 253 | |
| 254 | const Experiment::Choice kDefaultTileHeightChoices[] = { |
| 255 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 256 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT, |
| 257 | switches::kDefaultTileHeight, "128"}, |
| 258 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL, |
| 259 | switches::kDefaultTileHeight, "256"}, |
| 260 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE, |
| 261 | switches::kDefaultTileHeight, "512"}, |
| 262 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI, |
| 263 | switches::kDefaultTileHeight, "1024"} |
| 264 | }; |
| 265 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 266 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
[email protected] | 9a3de3e3 | 2013-04-23 19:05:21 | [diff] [blame] | 267 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 268 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 269 | switches::kUseSimpleCacheBackend, "off" }, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 270 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 271 | switches::kUseSimpleCacheBackend, "on"} |
| 272 | }; |
| 273 | |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 274 | #if defined(USE_AURA) |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 275 | const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 276 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 277 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 278 | switches::kTabCaptureUpscaleQuality, "fast" }, |
| 279 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 280 | switches::kTabCaptureUpscaleQuality, "good" }, |
| 281 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 282 | switches::kTabCaptureUpscaleQuality, "best" }, |
| 283 | }; |
| 284 | |
| 285 | const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 286 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 287 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 288 | switches::kTabCaptureDownscaleQuality, "fast" }, |
| 289 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 290 | switches::kTabCaptureDownscaleQuality, "good" }, |
| 291 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 292 | switches::kTabCaptureDownscaleQuality, "best" }, |
| 293 | }; |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 294 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 295 | |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 296 | #if defined(OS_ANDROID) |
| 297 | const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 298 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 299 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 300 | switches::kEnableZeroSuggestMostVisited, ""}, |
mariakhomenko | ad3bfef | 2014-10-27 22:57:33 | [diff] [blame] | 301 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP, |
| 302 | switches::kEnableZeroSuggestMostVisitedWithoutSerp, ""}, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 303 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 304 | switches::kDisableZeroSuggest, ""} |
| 305 | }; |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 306 | |
| 307 | const Experiment::Choice kReaderModeHeuristicsChoices[] = { |
| 308 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 309 | { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP, |
| 310 | switches::kReaderModeHeuristics, |
| 311 | switches::reader_mode_heuristics::kOGArticle }, |
| 312 | { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST, |
| 313 | switches::kReaderModeHeuristics, |
| 314 | switches::reader_mode_heuristics::kAdaBoost }, |
| 315 | { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON, |
| 316 | switches::kReaderModeHeuristics, |
| 317 | switches::reader_mode_heuristics::kAlwaysTrue }, |
| 318 | { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF, |
| 319 | switches::kReaderModeHeuristics, |
| 320 | switches::reader_mode_heuristics::kNone }, |
| 321 | }; |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 322 | #endif |
| 323 | |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 324 | const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 325 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | 00d92d3 | 2014-01-23 09:46:50 | [diff] [blame] | 326 | { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 327 | { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 328 | { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 329 | { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 330 | }; |
| 331 | |
Stephen White | d0bdd942 | 2015-04-03 00:29:35 | [diff] [blame] | 332 | const Experiment::Choice kGpuRasterizationMSAASampleCountChoices[] = { |
| 333 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 334 | "", |
| 335 | "" }, |
| 336 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO, |
| 337 | switches::kGpuRasterizationMSAASampleCount, "0" }, |
| 338 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO, |
| 339 | switches::kGpuRasterizationMSAASampleCount, "2" }, |
| 340 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR, |
| 341 | switches::kGpuRasterizationMSAASampleCount, "4" }, |
| 342 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT, |
| 343 | switches::kGpuRasterizationMSAASampleCount, "8" }, |
| 344 | { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN, |
| 345 | switches::kGpuRasterizationMSAASampleCount, "16" }, |
| 346 | }; |
| 347 | |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 348 | const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 349 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 350 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 351 | switches::kEnableGpuRasterization, "" }, |
| 352 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 353 | switches::kDisableGpuRasterization, "" }, |
| 354 | { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 355 | switches::kForceGpuRasterization, "" }, |
| 356 | }; |
| 357 | |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 358 | #if defined(OS_CHROMEOS) |
| 359 | const Experiment::Choice kMemoryPressureThresholdChoices[] = { |
xdai | f735c7a | 2015-02-12 02:08:34 | [diff] [blame] | 360 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 361 | { IDS_FLAGS_CONSERVATIVE_THRESHOLDS, |
| 362 | chromeos::switches::kMemoryPressureThresholds, |
| 363 | chromeos::switches::kConservativeThreshold }, |
| 364 | { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS, |
| 365 | chromeos::switches::kMemoryPressureThresholds, |
| 366 | chromeos::switches::kAggressiveCacheDiscardThreshold }, |
| 367 | { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS, |
| 368 | chromeos::switches::kMemoryPressureThresholds, |
| 369 | chromeos::switches::kAggressiveTabDiscardThreshold }, |
| 370 | { IDS_FLAGS_AGGRESSIVE_THRESHOLDS, |
| 371 | chromeos::switches::kMemoryPressureThresholds, |
| 372 | chromeos::switches::kAggressiveThreshold }, |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 373 | }; |
| 374 | #endif |
| 375 | |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 376 | const Experiment::Choice kExtensionContentVerificationChoices[] = { |
| 377 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 378 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 379 | switches::kExtensionContentVerification, |
| 380 | switches::kExtensionContentVerificationBootstrap }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 381 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 382 | switches::kExtensionContentVerification, |
| 383 | switches::kExtensionContentVerificationEnforce }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 384 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 385 | switches::kExtensionContentVerification, |
| 386 | switches::kExtensionContentVerificationEnforceStrict }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 387 | }; |
| 388 | |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 389 | const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 390 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 391 | { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 392 | password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 393 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 394 | password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 395 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 396 | password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 397 | }; |
| 398 | |
jww | c3ab6e7b | 2014-12-23 18:16:18 | [diff] [blame] | 399 | const Experiment::Choice kFillOnAccountSelectChoices[] = { |
| 400 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 401 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 402 | autofill::switches::kDisableFillOnAccountSelect, "" }, |
| 403 | { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING, |
| 404 | autofill::switches::kEnableFillOnAccountSelect, "" }, |
| 405 | { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING, |
| 406 | autofill::switches::kEnableFillOnAccountSelectNoHighlighting, "" }, |
| 407 | }; |
| 408 | |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 409 | #if defined(USE_ASH) |
| 410 | const Experiment::Choice kAshScreenRotationAnimationChoices[] = { |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 411 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 412 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 413 | ash::switches::kAshEnableScreenRotationAnimation, |
| 414 | "none" }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 415 | { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION, |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 416 | ash::switches::kAshEnableScreenRotationAnimation, |
| 417 | "partial-rotation" }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 418 | { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION, |
bruthig | 2ce3f23 | 2015-04-02 15:21:35 | [diff] [blame] | 419 | ash::switches::kAshEnableScreenRotationAnimation, |
| 420 | "full-rotation" } |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 421 | }; |
| 422 | #endif |
| 423 | |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 424 | #if defined(OS_CHROMEOS) |
| 425 | const Experiment::Choice kDataSaverPromptChoices[] = { |
| 426 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 427 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 428 | chromeos::switches::kDisableDataSaverPrompt, "" }, |
| 429 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 430 | chromeos::switches::kEnableDataSaverPrompt, "" }, |
| 431 | { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE, |
| 432 | chromeos::switches::kEnableDataSaverPrompt, |
| 433 | chromeos::switches::kDataSaverPromptDemoMode }, |
| 434 | }; |
bshe | b67430e | 2015-04-30 14:02:11 | [diff] [blame] | 435 | |
| 436 | const Experiment::Choice kFloatingVirtualKeyboardChoices[] = { |
| 437 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 438 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 439 | keyboard::switches::kFloatingVirtualKeyboard, |
| 440 | keyboard::switches::kFloatingVirtualKeyboardDisabled}, |
| 441 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 442 | keyboard::switches::kFloatingVirtualKeyboard, |
| 443 | keyboard::switches::kFloatingVirtualKeyboardEnabled}, |
| 444 | }; |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 445 | |
rsadam | 318530d | 2015-06-05 15:57:03 | [diff] [blame] | 446 | const Experiment::Choice kSmartVirtualKeyboardChoices[] = { |
| 447 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 448 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 449 | keyboard::switches::kSmartVirtualKeyboard, |
| 450 | keyboard::switches::kSmartVirtualKeyboardDisabled}, |
| 451 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 452 | keyboard::switches::kSmartVirtualKeyboard, |
| 453 | keyboard::switches::kSmartVirtualKeyboardEnabled}, |
| 454 | }; |
| 455 | |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 456 | const Experiment::Choice kGestureTypingChoices[] = { |
| 457 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 458 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 459 | keyboard::switches::kGestureTyping, |
| 460 | keyboard::switches::kGestureTypingDisabled}, |
| 461 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 462 | keyboard::switches::kGestureTyping, |
| 463 | keyboard::switches::kGestureTypingEnabled}, |
| 464 | }; |
| 465 | |
rsadam | ecb5ce9e | 2015-05-12 16:24:53 | [diff] [blame] | 466 | const Experiment::Choice kGestureEditingChoices[] = { |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 467 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 468 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
rsadam | ecb5ce9e | 2015-05-12 16:24:53 | [diff] [blame] | 469 | keyboard::switches::kGestureEditing, |
| 470 | keyboard::switches::kGestureEditingDisabled}, |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 471 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
rsadam | ecb5ce9e | 2015-05-12 16:24:53 | [diff] [blame] | 472 | keyboard::switches::kGestureEditing, |
| 473 | keyboard::switches::kGestureEditingEnabled}, |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 474 | }; |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 475 | #endif |
| 476 | |
treib | e2082a0e | 2015-04-08 10:15:30 | [diff] [blame] | 477 | const Experiment::Choice kSupervisedUserSafeSitesChoices[] = { |
| 478 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 479 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 480 | switches::kSupervisedUserSafeSites, |
| 481 | "enabled" }, |
| 482 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 483 | switches::kSupervisedUserSafeSites, |
| 484 | "disabled" }, |
| 485 | { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY, |
| 486 | switches::kSupervisedUserSafeSites, |
| 487 | "blacklist-only" }, |
| 488 | { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY, |
| 489 | switches::kSupervisedUserSafeSites, |
| 490 | "online-check-only" } |
| 491 | }; |
| 492 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 493 | // RECORDING USER METRICS FOR FLAGS: |
| 494 | // ----------------------------------------------------------------------------- |
| 495 | // The first line of the experiment is the internal name. If you'd like to |
| 496 | // gather statistics about the usage of your flag, you should append a marker |
| 497 | // comment to the end of the feature name, like so: |
| 498 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 499 | // |
[email protected] | d8320fb6 | 2014-03-22 03:16:37 | [diff] [blame] | 500 | // After doing that, run |
| 501 | // tools/metrics/actions/extract_actions.py |
| 502 | // to add the metric to actions.xml (which will enable UMA to record your |
| 503 | // feature flag), then update the <owner>s and <description> sections. Make sure |
| 504 | // to include the actions.xml file when you upload your code for review! |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 505 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 506 | // After your feature has shipped under a flag, you can locate the metrics under |
| 507 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 508 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 509 | // get a sense of usage. Note that this will not be the same as number of users |
| 510 | // with a given feature enabled because users can quit and relaunch the |
| 511 | // application multiple times over a given time interval. The dashboard also |
| 512 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 513 | // last seven days. However, note that this is not the same as the number of |
| 514 | // users who have the flag enabled, since enabling the flag happens once, |
| 515 | // whereas running with the flag enabled happens until the user flips the flag |
| 516 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 517 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 518 | // To add a new experiment add to the end of kExperiments. There are two |
| 519 | // distinct types of experiments: |
| 520 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 521 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 522 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 523 | // deactivated state for this lab (i.e. no command line option). To specify |
| 524 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 525 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 526 | // See the documentation of Experiment for details on the fields. |
| 527 | // |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 528 | // Command-line switches must have entries in enum "LoginCustomFlags" in |
| 529 | // histograms.xml. See note in histograms.xml and don't forget to run |
| 530 | // AboutFlagsHistogramTest unit test to calculate and verify checksum. |
| 531 | // |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 532 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 533 | const Experiment kExperiments[] = { |
| 534 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 535 | "ignore-gpu-blacklist", |
| 536 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 537 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 538 | kOsAll, |
| 539 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 540 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 541 | #if defined(OS_WIN) |
| 542 | { |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 543 | "disable-direct-write", |
| 544 | IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME, |
| 545 | IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 546 | kOsWin, |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 547 | SINGLE_VALUE_TYPE(switches::kDisableDirectWrite) |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 548 | }, |
| 549 | #endif |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 550 | { |
[email protected] | 2b60875 | 2013-05-01 03:34:36 | [diff] [blame] | 551 | "enable-experimental-canvas-features", |
| 552 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME, |
| 553 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION, |
| 554 | kOsAll, |
| 555 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures) |
| 556 | }, |
| 557 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 558 | "disable-accelerated-2d-canvas", |
| 559 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 560 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 561 | kOsAll, |
| 562 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 563 | }, |
| 564 | { |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 565 | "enable-display-list-2d-canvas", |
| 566 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME, |
| 567 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION, |
| 568 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 569 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas, |
| 570 | switches::kDisableDisplayList2dCanvas) |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 571 | }, |
| 572 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 573 | "composited-layer-borders", |
| 574 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 575 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 576 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 577 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 578 | }, |
| 579 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 580 | "show-fps-counter", |
| 581 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 582 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 583 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 584 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 585 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 586 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 587 | "disable-webgl", |
| 588 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 589 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | 6c7784e | 2013-08-01 22:41:28 | [diff] [blame] | 590 | kOsAll, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 591 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 592 | }, |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 593 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 594 | "disable-webrtc", |
| 595 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 596 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 597 | kOsAndroid, |
| 598 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 599 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 600 | #else |
| 601 | SINGLE_VALUE_TYPE("") |
| 602 | #endif |
| 603 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 604 | #if defined(ENABLE_WEBRTC) |
[email protected] | d816ddc | 2013-05-23 14:28:30 | [diff] [blame] | 605 | { |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 606 | "disable-webrtc-hw-decoding", |
| 607 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME, |
| 608 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION, |
[email protected] | 6442b02 | 2013-12-05 11:09:05 | [diff] [blame] | 609 | kOsAndroid | kOsCrOS, |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 610 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding) |
| 611 | }, |
| 612 | { |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 613 | "disable-webrtc-hw-encoding", |
| 614 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME, |
| 615 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION, |
[email protected] | 6998f01f2 | 2013-12-04 09:27:57 | [diff] [blame] | 616 | kOsAndroid | kOsCrOS, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 617 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding) |
| 618 | }, |
pthatcher | b3b993a | 2015-03-13 01:04:04 | [diff] [blame] | 619 | { |
| 620 | "enable-webrtc-stun-origin", |
| 621 | IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME, |
| 622 | IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION, |
| 623 | kOsAll, |
| 624 | SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin) |
| 625 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 626 | #endif |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 627 | #if defined(OS_ANDROID) |
| 628 | { |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 629 | "disable-webaudio", |
| 630 | IDS_FLAGS_DISABLE_WEBAUDIO_NAME, |
| 631 | IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION, |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 632 | kOsAndroid, |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 633 | SINGLE_VALUE_TYPE(switches::kDisableWebAudio) |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 634 | }, |
| 635 | #endif |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 636 | // Native client is compiled out when DISABLE_NACL is defined. |
| 637 | #if !defined(DISABLE_NACL) |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 638 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 639 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 640 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 641 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 642 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 643 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 644 | }, |
| 645 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 646 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 647 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 648 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 649 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 650 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 651 | }, |
| 652 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 653 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 654 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 655 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 656 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 657 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 658 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 659 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 660 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 661 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 662 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 663 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 664 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 665 | kOsDesktop, |
[email protected] | c8d0299 | 2013-07-31 22:16:51 | [diff] [blame] | 666 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 667 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 668 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 669 | "extensions-on-chrome-urls", |
| 670 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 671 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 672 | kOsAll, |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 673 | SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 674 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 675 | #endif |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 676 | { |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 677 | "enable-fast-unload", |
| 678 | IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, |
| 679 | IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION, |
| 680 | kOsAll, |
| 681 | SINGLE_VALUE_TYPE(switches::kEnableFastUnload) |
| 682 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 683 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 684 | { |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 685 | "enable-app-window-controls", |
| 686 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, |
| 687 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION, |
| 688 | kOsDesktop, |
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 689 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls) |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 690 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 691 | #endif |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 692 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 693 | "disable-hyperlink-auditing", |
| 694 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 695 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 696 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 697 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 698 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 699 | #if defined(OS_ANDROID) |
| 700 | { |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 701 | "contextual-search", |
| 702 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH, |
| 703 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION, |
| 704 | kOsAndroid, |
[email protected] | 41d32bb | 2014-05-30 08:26:05 | [diff] [blame] | 705 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, |
| 706 | switches::kDisableContextualSearch) |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 707 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 708 | #endif |
[email protected] | 8cc9e53 | 2013-05-06 21:01:47 | [diff] [blame] | 709 | { |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 710 | "show-autofill-type-predictions", |
| 711 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 712 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 713 | kOsAll, |
[email protected] | e217c563 | 2013-04-12 19:11:48 | [diff] [blame] | 714 | SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions) |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 715 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 716 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 717 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 718 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 719 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 720 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 721 | // On by default for the Mac (different implementation in WebKit). |
skobes | 663a3a2 | 2015-05-26 21:29:56 | [diff] [blame] | 722 | kOsLinux | kOsWin, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 723 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 724 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 725 | #if defined(USE_AURA) || defined(OS_LINUX) |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 726 | { |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 727 | "overlay-scrollbars", |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 728 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME, |
| 729 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION, |
| 730 | // Uses the system preference on Mac (a different implementation). |
| 731 | // On Android, this is always enabled. |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 732 | kOsLinux | kOsCrOS | kOsWin, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 733 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar, |
| 734 | switches::kDisableOverlayScrollbar) |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 735 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 736 | #endif |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 737 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 738 | "enable-panels", |
| 739 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 740 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 741 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 742 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 743 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 744 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 745 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 746 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 747 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 748 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 749 | kOsMac | kOsWin | kOsLinux, |
| 750 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 751 | }, |
| 752 | { |
[email protected] | 903e6338 | 2013-06-01 00:40:58 | [diff] [blame] | 753 | "enable-quic", |
| 754 | IDS_FLAGS_ENABLE_QUIC_NAME, |
| 755 | IDS_FLAGS_ENABLE_QUIC_DESCRIPTION, |
| 756 | kOsAll, |
| 757 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, |
| 758 | switches::kDisableQuic) |
| 759 | }, |
| 760 | { |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 761 | "disable-media-source", |
| 762 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 763 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 764 | kOsAll, |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 765 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 722b4d484f | 2013-10-08 20:33:59 | [diff] [blame] | 766 | }, |
| 767 | { |
ddorwin | 73bdb0b | 2015-01-26 23:03:09 | [diff] [blame] | 768 | "disable-encrypted-media", |
| 769 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME, |
| 770 | IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 771 | kOsAll, |
ddorwin | 73bdb0b | 2015-01-26 23:03:09 | [diff] [blame] | 772 | SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia) |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 773 | }, |
| 774 | { |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 775 | "disable-prefixed-encrypted-media", |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 776 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME, |
| 777 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 778 | kOsAll, |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 779 | SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 780 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 781 | #if defined(OS_ANDROID) |
| 782 | { |
[email protected] | 3c56ec1 | 2013-09-25 02:03:42 | [diff] [blame] | 783 | "disable-infobar-for-protected-media-identifier", |
| 784 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME, |
| 785 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION, |
| 786 | kOsAndroid, |
| 787 | SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier) |
| 788 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 789 | #endif // defined(OS_ANDROID) |
[email protected] | d21ead4 | 2013-06-24 06:35:06 | [diff] [blame] | 790 | { |
dslomov | a893e97 | 2014-12-05 09:39:57 | [diff] [blame] | 791 | "disable-javascript-harmony-shipping", |
| 792 | IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME, |
| 793 | IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION, |
| 794 | kOsAll, |
| 795 | SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping) |
| 796 | }, |
| 797 | { |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 798 | "enable-javascript-harmony", |
| 799 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 800 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 801 | kOsAll, |
erikcorry | b251cb9 | 2014-09-25 23:48:51 | [diff] [blame] | 802 | SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony) |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 803 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 804 | { |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 805 | "disable-software-rasterizer", |
| 806 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 807 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 808 | #if defined(ENABLE_SWIFTSHADER) |
| 809 | kOsAll, |
| 810 | #else |
| 811 | 0, |
| 812 | #endif |
| 813 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 814 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 815 | { |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 816 | "enable-gpu-rasterization", |
| 817 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 818 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
hendrikw | e62dda56 | 2014-12-17 19:28:15 | [diff] [blame] | 819 | kOsAll, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 820 | MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 821 | }, |
| 822 | { |
Stephen White | d0bdd942 | 2015-04-03 00:29:35 | [diff] [blame] | 823 | "gpu-rasterization-msaa-sample-count", |
| 824 | IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME, |
| 825 | IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION, |
| 826 | kOsAll, |
| 827 | MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices) |
| 828 | }, |
| 829 | { |
pdr | cd73ed36 | 2015-03-31 22:51:58 | [diff] [blame] | 830 | "enable-slimming-paint", |
| 831 | IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME, |
| 832 | IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION, |
| 833 | kOsAll, |
| 834 | SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint) |
| 835 | }, |
| 836 | { |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 837 | "enable-experimental-web-platform-features", |
| 838 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 839 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 840 | kOsAll, |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 841 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 842 | }, |
| 843 | { |
ortuno | 89be0ad | 2015-05-22 21:54:16 | [diff] [blame] | 844 | "enable-web-bluetooth", |
| 845 | IDS_FLAGS_WEB_BLUETOOTH_NAME, |
| 846 | IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION, |
| 847 | kOsAll, |
| 848 | SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth) |
| 849 | }, |
| 850 | { |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 851 | "enable-devtools-experiments", |
| 852 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 853 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 854 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 855 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 856 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 857 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 858 | "silent-debugger-extension-api", |
| 859 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 860 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 861 | kOsDesktop, |
| 862 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 863 | }, |
oshima | 66a9f96 | 2014-11-07 20:01:16 | [diff] [blame] | 864 | #if defined(ENABLE_SPELLCHECK) |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 865 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 866 | "spellcheck-autocorrect", |
| 867 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 868 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 869 | kOsWin | kOsLinux | kOsCrOS, |
| 870 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 871 | }, |
oshima | 66a9f96 | 2014-11-07 20:01:16 | [diff] [blame] | 872 | #endif |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 873 | { |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 874 | "enable-scroll-prediction", |
| 875 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME, |
| 876 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION, |
| 877 | kOsDesktop, |
| 878 | SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction) |
| 879 | }, |
girard | fca876aa8 | 2015-05-22 22:01:00 | [diff] [blame] | 880 | #if defined(ENABLE_TOPCHROME_MD) |
| 881 | { |
| 882 | "top-chrome-md", |
| 883 | IDS_FLAGS_TOP_CHROME_MD, |
| 884 | IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION, |
| 885 | kOsWin | kOsCrOS, |
| 886 | ENABLE_DISABLE_VALUE_TYPE( |
| 887 | switches::kTopChromeMDEnabled, |
| 888 | switches::kTopChromeMDDisabled) |
| 889 | }, |
| 890 | #endif |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 891 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 892 | "touch-events", |
| 893 | IDS_TOUCH_EVENTS_NAME, |
| 894 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 895 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 896 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 897 | }, |
| 898 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 899 | "disable-touch-adjustment", |
| 900 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 901 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
zeeshanq | cf855b0 | 2014-09-25 18:09:49 | [diff] [blame] | 902 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 903 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 904 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 905 | #if defined(OS_CHROMEOS) |
| 906 | { |
[email protected] | 81f89e9 | 2014-02-21 14:27:35 | [diff] [blame] | 907 | "network-portal-notification", |
| 908 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME, |
| 909 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION, |
| 910 | kOsCrOS, |
| 911 | ENABLE_DISABLE_VALUE_TYPE( |
| 912 | chromeos::switches::kEnableNetworkPortalNotification, |
| 913 | chromeos::switches::kDisableNetworkPortalNotification) |
| 914 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 915 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 916 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 917 | "enable-download-resumption", |
| 918 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 919 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 920 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 921 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 922 | }, |
yoshiki | f42d8fc | 2015-03-04 20:07:50 | [diff] [blame] | 923 | { |
| 924 | "enable-download-notification", |
| 925 | IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME, |
| 926 | IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION, |
| 927 | kOsCrOS, |
| 928 | SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification) |
| 929 | }, |
[email protected] | 67fe364 | 2014-08-05 00:00:42 | [diff] [blame] | 930 | #if defined(ENABLE_PLUGINS) |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 931 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 932 | "allow-nacl-socket-api", |
| 933 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 934 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 935 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 936 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 937 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 938 | #endif |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 939 | #if defined(OS_CHROMEOS) |
| 940 | { |
| 941 | "allow-touchpad-three-finger-click", |
| 942 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 943 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 944 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 945 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick) |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 946 | }, |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 947 | { |
oshima | 94c2467 | 2015-05-01 16:06:14 | [diff] [blame] | 948 | "ash-enable-unified-desktop", |
| 949 | IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME, |
| 950 | IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION, |
| 951 | kOsCrOS, |
| 952 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop) |
| 953 | }, |
| 954 | { |
xiyuan | 47a05d0 | 2014-12-09 18:57:24 | [diff] [blame] | 955 | "disable-easy-unlock", |
| 956 | IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME, |
| 957 | IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION, |
isherman | e72a697a | 2014-11-26 05:08:21 | [diff] [blame] | 958 | kOsCrOS, |
xiyuan | 47a05d0 | 2014-12-09 18:57:24 | [diff] [blame] | 959 | SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock) |
isherman | e72a697a | 2014-11-26 05:08:21 | [diff] [blame] | 960 | }, |
| 961 | { |
isherman | 96bfc8d2 | 2014-11-06 00:42:46 | [diff] [blame] | 962 | "enable-easy-unlock-proximity-detection", |
| 963 | IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME, |
| 964 | IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION, |
| 965 | kOsCrOS, |
| 966 | SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection) |
| 967 | }, |
msarda | 4c408ff | 2015-04-22 14:27:56 | [diff] [blame] | 968 | { |
| 969 | "enable-easy-unlock-bluetooth-low-energy-detection", |
| 970 | IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME, |
| 971 | IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION, |
| 972 | kOsCrOS, |
| 973 | SINGLE_VALUE_TYPE( |
| 974 | proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery) |
| 975 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 976 | #endif |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 977 | #if defined(USE_ASH) |
| 978 | { |
[email protected] | 2ddf37b | 2013-04-20 01:15:58 | [diff] [blame] | 979 | "disable-minimize-on-second-launcher-item-click", |
| 980 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME, |
| 981 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION, |
| 982 | kOsAll, |
| 983 | SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick) |
| 984 | }, |
| 985 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 986 | "show-touch-hud", |
| 987 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 988 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 989 | kOsAll, |
| 990 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 991 | }, |
| 992 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 993 | "enable-pinch", |
| 994 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 995 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 996 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 997 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 998 | }, |
[email protected] | adcdcdd0 | 2014-04-25 03:30:24 | [diff] [blame] | 999 | #endif // defined(USE_ASH) |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 1000 | { |
[email protected] | 68bc37c | 2014-01-07 15:56:48 | [diff] [blame] | 1001 | "enable-viewport-meta", |
| 1002 | IDS_FLAGS_ENABLE_VIEWPORT_META_NAME, |
| 1003 | IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION, |
| 1004 | kOsLinux | kOsWin | kOsCrOS | kOsMac, |
| 1005 | SINGLE_VALUE_TYPE(switches::kEnableViewportMeta), |
| 1006 | }, |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 1007 | #if defined(OS_CHROMEOS) |
| 1008 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1009 | "disable-boot-animation", |
| 1010 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 1011 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 1012 | kOsCrOSOwnerOnly, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1013 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation), |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1014 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 1015 | { |
[email protected] | d739c1db | 2014-07-08 07:19:59 | [diff] [blame] | 1016 | "enable-video-player-chromecast-support", |
| 1017 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME, |
| 1018 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION, |
| 1019 | kOsCrOS, |
| 1020 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport) |
| 1021 | }, |
| 1022 | { |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1023 | "disable-office-editing-component-app", |
| 1024 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME, |
| 1025 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION, |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1026 | kOsCrOS, |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 1027 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp), |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1028 | }, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1029 | { |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 1030 | "disable-display-color-calibration", |
| 1031 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, |
| 1032 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, |
| 1033 | kOsCrOS, |
| 1034 | SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), |
| 1035 | }, |
jonross | 98fccbf6 | 2015-02-05 22:13:58 | [diff] [blame] | 1036 | { |
| 1037 | "ash-disable-screen-orientation-lock", |
| 1038 | IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME, |
| 1039 | IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION, |
| 1040 | kOsCrOS, |
| 1041 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock), |
| 1042 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1043 | #endif // defined(OS_CHROMEOS) |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1044 | { "disable-accelerated-video-decode", |
| 1045 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1046 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
sandersd | f4e60796 | 2015-01-15 20:30:52 | [diff] [blame] | 1047 | kOsMac | kOsWin | kOsCrOS, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1048 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1049 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1050 | #if defined(USE_ASH) |
[email protected] | 35c9a4e | 2013-09-14 01:32:38 | [diff] [blame] | 1051 | { |
| 1052 | "ash-debug-shortcuts", |
| 1053 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1054 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1055 | kOsAll, |
| 1056 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1057 | }, |
tdanderson | fd446a0 | 2015-03-30 21:51:00 | [diff] [blame] | 1058 | { |
| 1059 | "ash-disable-maximize-mode-window-backdrop", |
| 1060 | IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME, |
| 1061 | IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION, |
| 1062 | kOsCrOS, |
| 1063 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop), |
| 1064 | }, |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 1065 | { "ash-enable-touch-view-testing", |
| 1066 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME, |
| 1067 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION, |
| 1068 | kOsCrOS, |
| 1069 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting), |
| 1070 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1071 | { |
jonross | d24d766f | 2014-12-01 23:55:30 | [diff] [blame] | 1072 | "disable-touch-feedback", |
| 1073 | IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME, |
| 1074 | IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1075 | kOsCrOS, |
jonross | d24d766f | 2014-12-01 23:55:30 | [diff] [blame] | 1076 | SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback), |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1077 | }, |
oshima | 04a99582 | 2014-11-14 04:04:43 | [diff] [blame] | 1078 | { "ash-enable-mirrored-screen", |
| 1079 | IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME, |
| 1080 | IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION, |
| 1081 | kOsCrOS, |
| 1082 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen), |
| 1083 | }, |
bruthig | 37f9cad0 | 2015-03-12 22:28:50 | [diff] [blame] | 1084 | { |
| 1085 | "ash-enable-screen-rotation-animations", |
| 1086 | IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME, |
| 1087 | IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION, |
| 1088 | kOsCrOS, |
| 1089 | MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices) |
| 1090 | }, |
flackr | cff1d46 | 2015-06-02 20:23:59 | [diff] [blame] | 1091 | { |
| 1092 | "ash-stable-overview-order", |
| 1093 | IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME, |
| 1094 | IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION, |
| 1095 | kOsCrOS, |
| 1096 | ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder, |
| 1097 | ash::switches::kAshDisableStableOverviewOrder), |
| 1098 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1099 | #endif // defined(USE_ASH) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1100 | #if defined(OS_CHROMEOS) |
| 1101 | { |
smckay | ad90351f | 2015-02-09 22:40:19 | [diff] [blame] | 1102 | "disable-cloud-import", |
| 1103 | IDS_FLAGS_DISABLE_CLOUD_IMPORT, |
| 1104 | IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION, |
smckay | 451de88 | 2014-10-22 21:43:29 | [diff] [blame] | 1105 | kOsCrOS, |
smckay | ad90351f | 2015-02-09 22:40:19 | [diff] [blame] | 1106 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport) |
smckay | 451de88 | 2014-10-22 21:43:29 | [diff] [blame] | 1107 | }, |
| 1108 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1109 | "enable-request-tablet-site", |
| 1110 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1111 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1112 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1113 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1114 | }, |
| 1115 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1116 | { |
| 1117 | "debug-packed-apps", |
| 1118 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1119 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1120 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1121 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1122 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1123 | { |
| 1124 | "enable-password-generation", |
| 1125 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1126 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
rouslan | b2237a9c | 2014-10-28 00:58:47 | [diff] [blame] | 1127 | kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, |
[email protected] | c3cc063 | 2013-10-03 21:54:43 | [diff] [blame] | 1128 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration, |
| 1129 | autofill::switches::kDisablePasswordGeneration) |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1130 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1131 | { |
[email protected] | 0477c06 | 2014-04-30 15:02:18 | [diff] [blame] | 1132 | "enable-automatic-password-saving", |
| 1133 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME, |
| 1134 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION, |
| 1135 | kOsDesktop, |
| 1136 | SINGLE_VALUE_TYPE( |
| 1137 | password_manager::switches::kEnableAutomaticPasswordSaving) |
| 1138 | }, |
| 1139 | { |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1140 | "password-manager-reauthentication", |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1141 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME, |
| 1142 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION, |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 1143 | kOsMac | kOsWin, |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1144 | SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1145 | }, |
| 1146 | { |
msramek | e2ed8aa | 2015-05-18 22:11:17 | [diff] [blame] | 1147 | "enable-password-force-saving", |
| 1148 | IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME, |
| 1149 | IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION, |
| 1150 | kOsAll, |
| 1151 | SINGLE_VALUE_TYPE( |
| 1152 | password_manager::switches::kEnablePasswordForceSaving) |
| 1153 | }, |
| 1154 | { |
Garrett Casto | 2229912 | 2014-11-03 21:35:47 | [diff] [blame] | 1155 | "enable-password-link", |
| 1156 | IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME, |
| 1157 | IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION, |
| 1158 | kOsAndroid | kOsDesktop, |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1159 | ENABLE_DISABLE_VALUE_TYPE( |
Garrett Casto | 2229912 | 2014-11-03 21:35:47 | [diff] [blame] | 1160 | password_manager::switches::kEnablePasswordLink, |
| 1161 | password_manager::switches::kDisablePasswordLink) |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1162 | }, |
| 1163 | { |
engedy | a4b285e | 2015-02-04 12:30:21 | [diff] [blame] | 1164 | "enable-affiliation-based-matching", |
| 1165 | IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME, |
| 1166 | IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION, |
| 1167 | kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, |
| 1168 | ENABLE_DISABLE_VALUE_TYPE( |
| 1169 | password_manager::switches::kEnableAffiliationBasedMatching, |
| 1170 | password_manager::switches::kDisableAffiliationBasedMatching) |
| 1171 | }, |
| 1172 | { |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1173 | "wallet-service-use-sandbox", |
| 1174 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
| 1175 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, |
[email protected] | d4d5999 | 2014-06-04 23:48:07 | [diff] [blame] | 1176 | kOsAndroid | kOsDesktop, |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1177 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1178 | autofill::switches::kWalletServiceUseSandbox, "1", |
| 1179 | autofill::switches::kWalletServiceUseSandbox, "0") |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1180 | }, |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1181 | #if defined(USE_AURA) |
| 1182 | { |
| 1183 | "overscroll-history-navigation", |
| 1184 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
| 1185 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, |
| 1186 | kOsAll, |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 1187 | MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices) |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1188 | }, |
| 1189 | #endif |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1190 | { |
[email protected] | 888878e8 | 2013-07-24 22:49:40 | [diff] [blame] | 1191 | "scroll-end-effect", |
| 1192 | IDS_FLAGS_SCROLL_END_EFFECT_NAME, |
| 1193 | IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION, |
| 1194 | kOsCrOS, |
| 1195 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1196 | switches::kScrollEndEffect, "1", |
| 1197 | switches::kScrollEndEffect, "0") |
| 1198 | }, |
| 1199 | { |
beaudoin | 4e5b2bba | 2015-03-26 16:06:55 | [diff] [blame] | 1200 | "enable-icon-ntp", |
| 1201 | IDS_FLAGS_ENABLE_ICON_NTP_NAME, |
| 1202 | IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION, |
| 1203 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1204 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp, |
| 1205 | switches::kDisableIconNtp) |
| 1206 | }, |
| 1207 | { |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1208 | "enable-touch-drag-drop", |
| 1209 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1210 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1211 | kOsWin | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1212 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop, |
| 1213 | switches::kDisableTouchDragDrop) |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1214 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1215 | { |
| 1216 | "enable-touch-editing", |
| 1217 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1218 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
[email protected] | 877dd94 | 2014-06-06 16:02:01 | [diff] [blame] | 1219 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1220 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing, |
| 1221 | switches::kDisableTouchEditing) |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1222 | }, |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1223 | { |
mfomitchev | 5ad034ec | 2015-04-24 21:57:27 | [diff] [blame] | 1224 | "touch-selection-strategy", |
| 1225 | IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME, |
| 1226 | IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION, |
| 1227 | kOsAndroid, // TODO(mfomitchev): Add CrOS/Win/Linux support soon. |
| 1228 | MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices) |
| 1229 | }, |
| 1230 | { |
ricea | 64c07d79 | 2014-10-08 03:37:00 | [diff] [blame] | 1231 | "enable-stale-while-revalidate", |
| 1232 | IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME, |
| 1233 | IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION, |
| 1234 | kOsAll, |
| 1235 | SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate) |
| 1236 | }, |
| 1237 | { |
[email protected] | 06a82ff | 2014-04-25 02:24:46 | [diff] [blame] | 1238 | "enable-suggestions-service", |
| 1239 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME, |
| 1240 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION, |
| 1241 | kOsAndroid | kOsCrOS, |
| 1242 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, |
| 1243 | switches::kDisableSuggestionsService) |
| 1244 | }, |
| 1245 | { |
treib | 1a600c7 | 2015-02-09 13:47:56 | [diff] [blame] | 1246 | "enable-supervised-user-managed-bookmarks-folder", |
| 1247 | IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME, |
| 1248 | IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION, |
| 1249 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1250 | SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder) |
| 1251 | }, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1252 | #if defined(ENABLE_APP_LIST) |
| 1253 | { |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1254 | "enable-sync-app-list", |
| 1255 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME, |
| 1256 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1257 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1258 | ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList, |
| 1259 | app_list::switches::kDisableSyncAppList) |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1260 | }, |
| 1261 | #endif |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1262 | #if defined(OS_MACOSX) |
| 1263 | { |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1264 | "enable-avfoundation", |
| 1265 | IDS_FLAGS_ENABLE_AVFOUNDATION_NAME, |
| 1266 | IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1267 | kOsMac, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1268 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation, |
| 1269 | switches::kForceQTKit) |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1270 | }, |
| 1271 | #endif |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1272 | { |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1273 | "lcd-text-aa", |
| 1274 | IDS_FLAGS_LCD_TEXT_NAME, |
| 1275 | IDS_FLAGS_LCD_TEXT_DESCRIPTION, |
| 1276 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1277 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText, |
| 1278 | switches::kDisableLCDText) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1279 | }, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1280 | #if defined(OS_ANDROID) || defined(OS_MACOSX) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1281 | { |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1282 | "delegated-renderer", |
| 1283 | IDS_FLAGS_DELEGATED_RENDERER_NAME, |
| 1284 | IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1285 | kOsAndroid, // TODO(ccameron) Add mac support soon. |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1286 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer, |
| 1287 | switches::kDisableDelegatedRenderer) |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1288 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1289 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1290 | { |
brettw | 61a39cf | 2015-03-30 21:24:14 | [diff] [blame] | 1291 | "enable-offer-store-unmasked-wallet-cards", |
| 1292 | IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS, |
| 1293 | IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION, |
| 1294 | kOsAll, |
| 1295 | ENABLE_DISABLE_VALUE_TYPE( |
| 1296 | autofill::switches::kEnableOfferStoreUnmaskedWalletCards, |
| 1297 | autofill::switches::kDisableOfferStoreUnmaskedWalletCards) |
| 1298 | }, |
| 1299 | { |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1300 | "enable-offline-auto-reload", |
| 1301 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME, |
| 1302 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION, |
| 1303 | kOsAll, |
[email protected] | bd519e3 | 2014-05-09 01:33:17 | [diff] [blame] | 1304 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload, |
| 1305 | switches::kDisableOfflineAutoReload) |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1306 | }, |
| 1307 | { |
[email protected] | d2e1a0a | 2014-06-16 15:49:37 | [diff] [blame] | 1308 | "enable-offline-auto-reload-visible-only", |
| 1309 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME, |
| 1310 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION, |
| 1311 | kOsAll, |
| 1312 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly, |
| 1313 | switches::kDisableOfflineAutoReloadVisibleOnly) |
| 1314 | }, |
| 1315 | { |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 1316 | "show-saved-copy", |
| 1317 | IDS_FLAGS_SHOW_SAVED_COPY_NAME, |
| 1318 | IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION, |
afakhry | f0227a0 | 2014-11-17 23:12:41 | [diff] [blame] | 1319 | kOsAll, |
megjablon | 78a4254 | 2015-03-11 18:23:23 | [diff] [blame] | 1320 | MULTI_VALUE_TYPE(kShowSavedCopyChoices) |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1321 | }, |
| 1322 | { |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1323 | "default-tile-width", |
| 1324 | IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME, |
| 1325 | IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION, |
| 1326 | kOsAll, |
| 1327 | MULTI_VALUE_TYPE(kDefaultTileWidthChoices) |
| 1328 | }, |
| 1329 | { |
| 1330 | "default-tile-height", |
| 1331 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME, |
| 1332 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION, |
| 1333 | kOsAll, |
| 1334 | MULTI_VALUE_TYPE(kDefaultTileHeightChoices) |
| 1335 | }, |
[email protected] | 2289b43 | 2014-08-08 17:52:11 | [diff] [blame] | 1336 | #if defined(OS_ANDROID) |
| 1337 | { |
| 1338 | "disable-gesture-requirement-for-media-playback", |
| 1339 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1340 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1341 | kOsAndroid, |
| 1342 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1343 | }, |
| 1344 | #endif |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1345 | #if defined(OS_CHROMEOS) |
| 1346 | { |
| 1347 | "enable-virtual-keyboard", |
| 1348 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1349 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1350 | kOsCrOS, |
| 1351 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1352 | }, |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1353 | { |
[email protected] | bb6378fe | 2014-04-28 21:19:44 | [diff] [blame] | 1354 | "enable-virtual-keyboard-overscroll", |
| 1355 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME, |
| 1356 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION, |
| 1357 | kOsCrOS, |
| 1358 | ENABLE_DISABLE_VALUE_TYPE( |
| 1359 | keyboard::switches::kEnableVirtualKeyboardOverscroll, |
| 1360 | keyboard::switches::kDisableVirtualKeyboardOverscroll) |
| 1361 | }, |
| 1362 | { |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1363 | "enable-swipe-selection", |
| 1364 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME, |
| 1365 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION, |
| 1366 | kOsCrOS, |
| 1367 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection) |
| 1368 | }, |
[email protected] | 0e627fb1 | 2014-03-25 18:18:53 | [diff] [blame] | 1369 | { |
| 1370 | "enable-input-view", |
| 1371 | IDS_FLAGS_ENABLE_INPUT_VIEW_NAME, |
| 1372 | IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION, |
| 1373 | kOsCrOS, |
| 1374 | ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView, |
| 1375 | keyboard::switches::kDisableInputView) |
| 1376 | }, |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1377 | { |
shuchen | 07a4cb0 | 2015-05-14 05:52:09 | [diff] [blame] | 1378 | "disable-new-korean-ime", |
| 1379 | IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME, |
| 1380 | IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION, |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1381 | kOsCrOS, |
shuchen | 07a4cb0 | 2015-05-14 05:52:09 | [diff] [blame] | 1382 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme) |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1383 | }, |
| 1384 | { |
fengyuan | 0ad7e334 | 2015-03-25 06:44:11 | [diff] [blame] | 1385 | "disable-new-md-input-view", |
| 1386 | IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME, |
| 1387 | IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION, |
fengyuan | da3e4fb | 2014-12-08 15:46:27 | [diff] [blame] | 1388 | kOsCrOS, |
rsadam | ba9ebf7 | 2015-05-05 17:40:56 | [diff] [blame] | 1389 | SINGLE_VALUE_TYPE(keyboard::switches::kDisableNewMDInputView) |
fengyuan | da3e4fb | 2014-12-08 15:46:27 | [diff] [blame] | 1390 | }, |
| 1391 | { |
shuchen | ae80909 | 2015-02-15 05:26:47 | [diff] [blame] | 1392 | "enable-physical-keyboard-autocorrect", |
| 1393 | IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME, |
| 1394 | IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION, |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1395 | kOsCrOS, |
shuchen | ae80909 | 2015-02-15 05:26:47 | [diff] [blame] | 1396 | ENABLE_DISABLE_VALUE_TYPE( |
| 1397 | chromeos::switches::kEnablePhysicalKeyboardAutocorrect, |
| 1398 | chromeos::switches::kDisablePhysicalKeyboardAutocorrect) |
shuchen | 3efbc418 | 2015-01-20 06:54:36 | [diff] [blame] | 1399 | }, |
| 1400 | { |
| 1401 | "disable-voice-input", |
| 1402 | IDS_FLAGS_DISABLE_VOICE_INPUT_NAME, |
| 1403 | IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION, |
| 1404 | kOsCrOS, |
rsadam | ba9ebf7 | 2015-05-05 17:40:56 | [diff] [blame] | 1405 | SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput) |
shuchen | d900894 | 2014-10-23 15:17:14 | [diff] [blame] | 1406 | }, |
| 1407 | { |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1408 | "enable-experimental-input-view-features", |
| 1409 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME, |
| 1410 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION, |
| 1411 | kOsCrOS, |
| 1412 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures) |
| 1413 | }, |
rsadam | 9172bc8a | 2014-10-29 23:37:38 | [diff] [blame] | 1414 | { |
bshe | b67430e | 2015-04-30 14:02:11 | [diff] [blame] | 1415 | "floating-virtual-keyboard", |
| 1416 | IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME, |
| 1417 | IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1418 | kOsCrOS, |
| 1419 | MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices) |
| 1420 | }, |
| 1421 | { |
rsadam | 318530d | 2015-06-05 15:57:03 | [diff] [blame] | 1422 | "smart-virtual-keyboard", |
| 1423 | IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME, |
| 1424 | IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1425 | kOsCrOS, |
| 1426 | MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices) |
| 1427 | }, |
| 1428 | { |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 1429 | "gesture-typing", |
| 1430 | IDS_FLAGS_GESTURE_TYPING_NAME, |
| 1431 | IDS_FLAGS_GESTURE_TYPING_DESCRIPTION, |
stevet | 37b682b | 2015-01-22 14:37:16 | [diff] [blame] | 1432 | kOsCrOS, |
rsadam | b504002 | 2015-05-06 21:20:31 | [diff] [blame] | 1433 | MULTI_VALUE_TYPE(kGestureTypingChoices) |
stevet | 37b682b | 2015-01-22 14:37:16 | [diff] [blame] | 1434 | }, |
| 1435 | { |
rsadam | ecb5ce9e | 2015-05-12 16:24:53 | [diff] [blame] | 1436 | "gesture-editing", |
| 1437 | IDS_FLAGS_GESTURE_EDITING_NAME, |
| 1438 | IDS_FLAGS_GESTURE_EDITING_DESCRIPTION, |
rsadam | 0a9d935 | 2015-03-12 16:31:13 | [diff] [blame] | 1439 | kOsCrOS, |
rsadam | ecb5ce9e | 2015-05-12 16:24:53 | [diff] [blame] | 1440 | MULTI_VALUE_TYPE(kGestureEditingChoices) |
rsadam | 0a9d935 | 2015-03-12 16:31:13 | [diff] [blame] | 1441 | }, |
mukai | ecd95a6 | 2015-06-05 22:37:05 | [diff] [blame] | 1442 | { |
| 1443 | "enable-fullscreen-app-list", |
| 1444 | IDS_FLAGS_FULLSCREEN_APP_LIST_NAME, |
| 1445 | IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION, |
| 1446 | kOsCrOS, |
| 1447 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList) |
| 1448 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1449 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1450 | { |
| 1451 | "enable-simple-cache-backend", |
| 1452 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1453 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
[email protected] | 957cd5a | 2014-03-27 19:54:17 | [diff] [blame] | 1454 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1455 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1456 | }, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1457 | { |
| 1458 | "enable-tcp-fast-open", |
| 1459 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME, |
| 1460 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION, |
[email protected] | d0a8a16 | 2013-04-13 01:37:11 | [diff] [blame] | 1461 | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1462 | SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen) |
| 1463 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1464 | #if defined(ENABLE_SERVICE_DISCOVERY) |
[email protected] | a4ed7e1 | 2013-05-24 01:00:28 | [diff] [blame] | 1465 | { |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1466 | "device-discovery-notifications", |
| 1467 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME, |
| 1468 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1469 | kOsDesktop, |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1470 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications, |
| 1471 | switches::kDisableDeviceDiscoveryNotifications) |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1472 | }, |
[email protected] | 53ffe0d | 2013-10-30 01:20:40 | [diff] [blame] | 1473 | { |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1474 | "enable-print-preview-register-promos", |
| 1475 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME, |
| 1476 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1477 | kOsDesktop, |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1478 | SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos) |
| 1479 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1480 | #endif // ENABLE_SERVICE_DISCOVERY |
[email protected] | ca53b14 | 2014-02-25 22:42:23 | [diff] [blame] | 1481 | #if defined(OS_WIN) |
| 1482 | { |
| 1483 | "enable-cloud-print-xps", |
| 1484 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME, |
| 1485 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION, |
| 1486 | kOsWin, |
| 1487 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps) |
| 1488 | }, |
| 1489 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 1490 | #if defined(USE_AURA) |
| 1491 | { |
| 1492 | "tab-capture-upscale-quality", |
| 1493 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1494 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1495 | kOsAll, |
| 1496 | MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1497 | }, |
| 1498 | { |
| 1499 | "tab-capture-downscale-quality", |
| 1500 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1501 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1502 | kOsAll, |
| 1503 | MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1504 | }, |
| 1505 | #endif |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1506 | #if defined(TOOLKIT_VIEWS) |
| 1507 | { |
tdanderson | 5c0b95bd | 2015-03-12 19:40:48 | [diff] [blame] | 1508 | "disable-hide-inactive-stacked-tab-close-buttons", |
| 1509 | IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME, |
| 1510 | IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION, |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1511 | kOsCrOS | kOsWin | kOsLinux, |
tdanderson | 5c0b95bd | 2015-03-12 19:40:48 | [diff] [blame] | 1512 | SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons) |
tdanderson | 8edd6e4 | 2015-02-11 00:19:37 | [diff] [blame] | 1513 | }, |
| 1514 | #endif |
rouslan | c9c5b39a | 2015-03-25 19:58:36 | [diff] [blame] | 1515 | #if defined(ENABLE_SPELLCHECK) |
| 1516 | { |
| 1517 | "enable-spelling-feedback-field-trial", |
| 1518 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME, |
| 1519 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION, |
| 1520 | kOsAll, |
| 1521 | SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial) |
| 1522 | }, |
| 1523 | #endif |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1524 | { |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1525 | "enable-webgl-draft-extensions", |
| 1526 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME, |
| 1527 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION, |
| 1528 | kOsAll, |
| 1529 | SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions) |
| 1530 | }, |
[email protected] | deadc49 | 2013-06-07 21:39:28 | [diff] [blame] | 1531 | { |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1532 | "enable-new-profile-management", |
| 1533 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME, |
| 1534 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION, |
[email protected] | a3b75bd | 2014-05-28 17:49:42 | [diff] [blame] | 1535 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1536 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement, |
| 1537 | switches::kDisableNewProfileManagement) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1538 | }, |
| 1539 | { |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1540 | "enable-account-consistency", |
| 1541 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME, |
| 1542 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION, |
| 1543 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1544 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency, |
| 1545 | switches::kDisableAccountConsistency) |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1546 | }, |
| 1547 | { |
rogerta | 334d8037 | 2015-01-07 23:10:20 | [diff] [blame] | 1548 | "enable-iframe-based-signin", |
| 1549 | IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME, |
| 1550 | IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION, |
guohui | 69cf1473 | 2014-10-24 17:14:21 | [diff] [blame] | 1551 | kOsMac | kOsWin | kOsLinux, |
rogerta | 334d8037 | 2015-01-07 23:10:20 | [diff] [blame] | 1552 | SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin) |
guohui | 69cf1473 | 2014-10-24 17:14:21 | [diff] [blame] | 1553 | }, |
| 1554 | { |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1555 | "enable-google-profile-info", |
| 1556 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME, |
| 1557 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION, |
[email protected] | a9bf7d6 | 2013-07-11 22:11:22 | [diff] [blame] | 1558 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1559 | SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1560 | }, |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1561 | { |
[email protected] | 056ed709 | 2014-01-09 12:57:21 | [diff] [blame] | 1562 | "reset-app-list-install-state", |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1563 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME, |
| 1564 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION, |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1565 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1566 | SINGLE_VALUE_TYPE(switches::kResetAppListInstallState) |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1567 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1568 | #if defined(ENABLE_APP_LIST) |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1569 | #if defined(OS_LINUX) |
| 1570 | { |
| 1571 | // This is compiled out on non-Linux platforms because otherwise it would be |
| 1572 | // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing. |
| 1573 | // TODO(mgiuca): Remove the #if when Aura is the default on Linux. |
| 1574 | "enable-app-list", |
| 1575 | IDS_FLAGS_ENABLE_APP_LIST_NAME, |
| 1576 | IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION, |
| 1577 | kOsLinux, |
| 1578 | SINGLE_VALUE_TYPE(switches::kEnableAppList) |
| 1579 | }, |
| 1580 | #endif |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1581 | #if defined(ENABLE_EXTENSIONS) |
| 1582 | { |
fsamuel | 89d8ecf | 2014-12-19 02:11:30 | [diff] [blame] | 1583 | "enable-surface-worker", |
| 1584 | IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME, |
| 1585 | IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION, |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1586 | kOsDesktop, |
fsamuel | 89d8ecf | 2014-12-19 02:11:30 | [diff] [blame] | 1587 | SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker) |
fsamuel | dac7198 | 2014-12-09 20:55:16 | [diff] [blame] | 1588 | }, |
| 1589 | #endif |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1590 | { |
xiyuan | 37407a7 | 2014-10-15 00:06:22 | [diff] [blame] | 1591 | "disable-drive-apps-in-app-list", |
| 1592 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME, |
| 1593 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION, |
| 1594 | kOsCrOS, |
| 1595 | SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList) |
| 1596 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1597 | #endif |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1598 | #if defined(OS_ANDROID) |
| 1599 | { |
| 1600 | "enable-accessibility-tab-switcher", |
| 1601 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME, |
| 1602 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION, |
| 1603 | kOsAndroid, |
| 1604 | SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher) |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1605 | }, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1606 | { |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1607 | // TODO(dmazzoni): remove this flag when native android accessibility |
| 1608 | // ships in the stable channel. http://crbug.com/356775 |
| 1609 | "enable-accessibility-script-injection", |
| 1610 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME, |
| 1611 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1612 | kOsAndroid, |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1613 | // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION. |
| 1614 | SINGLE_VALUE_TYPE("enable-accessibility-script-injection") |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1615 | }, |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1616 | #endif |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1617 | { |
reveman | 976f647c3 | 2015-06-11 05:11:54 | [diff] [blame] | 1618 | "disable-one-copy", |
| 1619 | IDS_FLAGS_DISABLE_ONE_COPY_NAME, |
| 1620 | IDS_FLAGS_DISABLE_ONE_COPY_DESCRIPTION, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 1621 | kOsAll, |
reveman | 976f647c3 | 2015-06-11 05:11:54 | [diff] [blame] | 1622 | SINGLE_VALUE_TYPE(switches::kDisableOneCopy) |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1623 | }, |
| 1624 | { |
| 1625 | "enable-zero-copy", |
reveman | 976f647c3 | 2015-06-11 05:11:54 | [diff] [blame] | 1626 | IDS_FLAGS_ENABLE_ZERO_COPY_NAME, |
| 1627 | IDS_FLAGS_ENABLE_ZERO_COPY_DESCRIPTION, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1628 | kOsAll, |
reveman | 91a0a87 | 2014-11-04 03:40:32 | [diff] [blame] | 1629 | SINGLE_VALUE_TYPE(switches::kEnableZeroCopy) |
[email protected] | 4fdc518f | 2013-08-28 21:37:27 | [diff] [blame] | 1630 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1631 | #if defined(OS_CHROMEOS) |
| 1632 | { |
[email protected] | 407d82b | 2013-12-13 11:50:59 | [diff] [blame] | 1633 | "enable-first-run-ui-transitions", |
| 1634 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME, |
| 1635 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION, |
| 1636 | kOsCrOS, |
| 1637 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions) |
| 1638 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1639 | #endif |
[email protected] | ed1aab1 | 2013-10-08 14:27:07 | [diff] [blame] | 1640 | { |
benwells | a75f874b | 2015-02-07 04:15:14 | [diff] [blame] | 1641 | "disable-new-bookmark-apps", |
tapted | bf201644 | 2015-02-19 08:45:27 | [diff] [blame] | 1642 | IDS_FLAGS_NEW_BOOKMARK_APPS_NAME, |
| 1643 | IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION, |
mitchelljones | 6d1594de | 2014-12-02 01:42:44 | [diff] [blame] | 1644 | kOsWin | kOsCrOS | kOsLinux | kOsMac, |
tapted | bf201644 | 2015-02-19 08:45:27 | [diff] [blame] | 1645 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps, |
| 1646 | switches::kDisableNewBookmarkApps) |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1647 | }, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1648 | #if defined(OS_MACOSX) |
| 1649 | { |
mitchelljones | 3e8befd | 2015-02-13 01:06:12 | [diff] [blame] | 1650 | "disable-hosted-app-shim-creation", |
| 1651 | IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME, |
| 1652 | IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1653 | kOsMac, |
mitchelljones | 3e8befd | 2015-02-13 01:06:12 | [diff] [blame] | 1654 | SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation) |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1655 | }, |
mitchelljones | 3bc6ced | 2014-12-19 05:01:37 | [diff] [blame] | 1656 | { |
| 1657 | "enable-hosted-app-quit-notification", |
| 1658 | IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME, |
| 1659 | IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION, |
| 1660 | kOsMac, |
| 1661 | SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification) |
| 1662 | }, |
mitchelljones | 58e35915 | 2014-12-19 01:10:13 | [diff] [blame] | 1663 | #endif |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1664 | { |
benwells | 2946900 | 2014-12-09 08:02:59 | [diff] [blame] | 1665 | "enable-ephemeral-apps-in-webstore", |
| 1666 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME, |
| 1667 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1668 | kOsAll, |
benwells | 2946900 | 2014-12-09 08:02:59 | [diff] [blame] | 1669 | SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore) |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1670 | }, |
| 1671 | { |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1672 | "enable-linkable-ephemeral-apps", |
| 1673 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME, |
| 1674 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1675 | kOsAll, |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1676 | SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps) |
| 1677 | }, |
| 1678 | { |
[email protected] | 7d8056d | 2014-04-14 15:55:21 | [diff] [blame] | 1679 | "enable-service-worker-sync", |
| 1680 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME, |
| 1681 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION, |
| 1682 | kOsAll, |
| 1683 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync) |
| 1684 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1685 | #if defined(OS_ANDROID) |
| 1686 | { |
| 1687 | "disable-click-delay", |
| 1688 | IDS_FLAGS_DISABLE_CLICK_DELAY_NAME, |
| 1689 | IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION, |
| 1690 | kOsAndroid, |
| 1691 | // Java-only switch: CommandLine.DISABLE_CLICK_DELAY |
| 1692 | SINGLE_VALUE_TYPE("disable-click-delay") |
| 1693 | }, |
jdduke | 0fa51299 | 2014-11-21 03:18:45 | [diff] [blame] | 1694 | { |
| 1695 | "disable-pull-to-refresh-effect", |
| 1696 | IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME, |
| 1697 | IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION, |
| 1698 | kOsAndroid, |
| 1699 | SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect) |
| 1700 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1701 | #endif |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1702 | #if defined(OS_MACOSX) |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1703 | { |
| 1704 | "enable-translate-new-ux", |
| 1705 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME, |
| 1706 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1707 | kOsMac, |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1708 | SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX) |
| 1709 | }, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1710 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1711 | #if defined(TOOLKIT_VIEWS) |
| 1712 | { |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1713 | "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA |
| 1714 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME, |
| 1715 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION, |
[email protected] | 42f5fe54 | 2014-07-25 17:59:33 | [diff] [blame] | 1716 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1717 | SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1718 | }, |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1719 | { |
luken | 30ef562 | 2014-11-24 19:37:55 | [diff] [blame] | 1720 | "enable-link-disambiguation-popup", |
| 1721 | IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME, |
| 1722 | IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION, |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1723 | kOsCrOS | kOsWin, |
luken | 30ef562 | 2014-11-24 19:37:55 | [diff] [blame] | 1724 | SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup) |
luken | e23094a | 2014-11-23 14:12:31 | [diff] [blame] | 1725 | }, |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1726 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1727 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1728 | { |
| 1729 | "enable-apps-show-on-first-paint", |
| 1730 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, |
| 1731 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION, |
| 1732 | kOsDesktop, |
[email protected] | 6fa20245 | 2014-08-19 05:34:07 | [diff] [blame] | 1733 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1734 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1735 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1736 | { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1737 | "enhanced-bookmarks-experiment", |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1738 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1739 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1740 | kOsDesktop | kOsAndroid, |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1741 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1742 | switches::kEnhancedBookmarksExperiment, "1", |
| 1743 | switches::kEnhancedBookmarksExperiment, "0") |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1744 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1745 | #if defined(OS_ANDROID) |
| 1746 | { |
| 1747 | "enable-zero-suggest-experiment", |
| 1748 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME, |
| 1749 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION, |
| 1750 | kOsAndroid, |
| 1751 | MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices) |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1752 | }, |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1753 | { |
cjhopman | 951bb61 | 2015-04-22 01:42:38 | [diff] [blame] | 1754 | "reader-mode-heuristics", |
| 1755 | IDS_FLAGS_READER_MODE_HEURISTICS_NAME, |
| 1756 | IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION, |
| 1757 | kOsAndroid, |
| 1758 | MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices) |
| 1759 | }, |
| 1760 | { |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1761 | "enable-reader-mode-toolbar-icon", |
| 1762 | IDS_FLAGS_READER_MODE_EXPERIMENT_NAME, |
| 1763 | IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION, |
| 1764 | kOsAndroid, |
| 1765 | SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon) |
| 1766 | }, |
aruslan | d4c3a50 | 2015-04-03 16:38:51 | [diff] [blame] | 1767 | { |
| 1768 | "enable-dom-distiller-button-animation", |
| 1769 | IDS_FLAGS_READER_MODE_BUTTON_ANIMATION, |
| 1770 | IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION, |
| 1771 | kOsAndroid, |
| 1772 | SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation) |
| 1773 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1774 | #endif |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1775 | { |
| 1776 | "num-raster-threads", |
| 1777 | IDS_FLAGS_NUM_RASTER_THREADS_NAME, |
| 1778 | IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, |
| 1779 | kOsAll, |
| 1780 | MULTI_VALUE_TYPE(kNumRasterThreadsChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1781 | }, |
| 1782 | { |
brettw | b505b7a | 2014-11-26 22:05:32 | [diff] [blame] | 1783 | "enable-single-click-autofill", |
| 1784 | IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME, |
| 1785 | IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION, |
rouslan | c291fa67 | 2014-12-04 23:45:16 | [diff] [blame] | 1786 | kOsCrOS | kOsMac | kOsWin | kOsLinux | kOsAndroid, |
brettw | b505b7a | 2014-11-26 22:05:32 | [diff] [blame] | 1787 | ENABLE_DISABLE_VALUE_TYPE( |
| 1788 | autofill::switches::kEnableSingleClickAutofill, |
| 1789 | autofill::switches::kDisableSingleClickAutofill) |
| 1790 | }, |
| 1791 | { |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1792 | "enable-permissions-bubbles", |
| 1793 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME, |
| 1794 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION, |
[email protected] | 4e6d54a | 2014-06-27 14:32:12 | [diff] [blame] | 1795 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 7d19822 | 2014-06-17 08:24:22 | [diff] [blame] | 1796 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles, |
| 1797 | switches::kDisablePermissionsBubbles) |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1798 | }, |
[email protected] | 4d11b08b | 2014-01-27 22:19:07 | [diff] [blame] | 1799 | { |
benwells | edf5e08 | 2015-04-23 02:45:14 | [diff] [blame] | 1800 | "enable-site-engagement-service", |
| 1801 | IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME, |
| 1802 | IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION, |
| 1803 | kOsAll, |
| 1804 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService, |
| 1805 | switches::kDisableSiteEngagementService) |
| 1806 | }, |
| 1807 | { |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1808 | "enable-session-crashed-bubble", |
| 1809 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME, |
| 1810 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION, |
| 1811 | kOsWin | kOsLinux, |
[email protected] | 3d990b7 | 2014-05-27 21:16:13 | [diff] [blame] | 1812 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble, |
| 1813 | switches::kDisableSessionCrashedBubble) |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1814 | }, |
| 1815 | { |
alexandrec | a3f5c41 | 2015-02-05 00:53:34 | [diff] [blame] | 1816 | "enable-pdf-material-ui", |
| 1817 | IDS_FLAGS_PDF_MATERIAL_UI_NAME, |
| 1818 | IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION, |
| 1819 | kOsDesktop, |
| 1820 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI, |
| 1821 | switches::kDisablePdfMaterialUI) |
| 1822 | }, |
| 1823 | { |
hclam | 674f12e | 2014-11-06 00:25:18 | [diff] [blame] | 1824 | "disable-cast-streaming-hw-encoding", |
| 1825 | IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME, |
| 1826 | IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION, |
| 1827 | kOsAll, |
| 1828 | SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding) |
| 1829 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1830 | #if defined(OS_ANDROID) |
| 1831 | { |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1832 | "disable-cast", |
| 1833 | IDS_FLAGS_DISABLE_CAST_NAME, |
| 1834 | IDS_FLAGS_DISABLE_CAST_DESCRIPTION, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1835 | kOsAndroid, |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1836 | SINGLE_VALUE_TYPE(switches::kDisableCast) |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1837 | }, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1838 | { |
| 1839 | "prefetch-search-results", |
| 1840 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME, |
| 1841 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1842 | kOsAndroid, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1843 | SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults) |
| 1844 | }, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1845 | #endif |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1846 | #if defined(ENABLE_APP_LIST) |
| 1847 | { |
| 1848 | "enable-experimental-app-list", |
| 1849 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, |
| 1850 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, |
| 1851 | kOsWin | kOsLinux | kOsCrOS, |
calamity | 9b4f185b | 2014-11-26 00:54:55 | [diff] [blame] | 1852 | ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList, |
| 1853 | app_list::switches::kDisableExperimentalAppList) |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1854 | }, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1855 | { |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1856 | "enable-centered-app-list", |
| 1857 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME, |
| 1858 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1859 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1860 | SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList) |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1861 | }, |
mgiuca | 77a1e8d1 | 2015-05-15 00:10:59 | [diff] [blame] | 1862 | { |
| 1863 | "enable-new-app-list-mixer", |
| 1864 | IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME, |
| 1865 | IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION, |
| 1866 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
| 1867 | ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer, |
| 1868 | app_list::switches::kDisableNewAppListMixer) |
| 1869 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1870 | #endif |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 1871 | { |
jdduke | 2eee6cb | 2014-09-25 17:02:21 | [diff] [blame] | 1872 | "disable-threaded-scrolling", |
| 1873 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME, |
| 1874 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION, |
jdduke | 896a4d48 | 2015-04-02 02:05:18 | [diff] [blame] | 1875 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid | kOsMac, |
jdduke | 2eee6cb | 2014-09-25 17:02:21 | [diff] [blame] | 1876 | SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling) |
| 1877 | }, |
| 1878 | { |
bokan | 9e556961 | 2015-06-09 18:41:20 | [diff] [blame] | 1879 | "invert-viewport-scroll-order", |
| 1880 | IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_NAME, |
| 1881 | IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_DESCRIPTION, |
| 1882 | kOsAll, |
| 1883 | SINGLE_VALUE_TYPE(switches::kInvertViewportScrollOrder) |
| 1884 | }, |
| 1885 | { |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1886 | "bleeding-edge-renderer-mode", |
| 1887 | IDS_FLAGS_BLEEDING_RENDERER_NAME, |
| 1888 | IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION, |
[email protected] | a8a9751 | 2014-03-24 18:28:20 | [diff] [blame] | 1889 | kOsAndroid, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1890 | SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths) |
| 1891 | }, |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1892 | { |
| 1893 | "enable-settings-window", |
| 1894 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME, |
| 1895 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION, |
| 1896 | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1897 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow, |
| 1898 | switches::kDisableSettingsWindow) |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1899 | }, |
[email protected] | 812b82a | 2014-05-15 19:01:38 | [diff] [blame] | 1900 | #if defined(OS_ANDROID) |
| 1901 | { |
| 1902 | "enable-instant-search-clicks", |
| 1903 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME, |
| 1904 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION, |
| 1905 | kOsAndroid, |
| 1906 | SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks) |
| 1907 | }, |
| 1908 | #endif |
[email protected] | 4dffb66 | 2014-03-31 11:31:22 | [diff] [blame] | 1909 | { |
| 1910 | "enable-save-password-bubble", |
| 1911 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME, |
| 1912 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION, |
dconnelly | 35f985b3 | 2014-08-29 10:40:55 | [diff] [blame] | 1913 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | ea61c08 | 2014-04-07 16:57:24 | [diff] [blame] | 1914 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble, |
| 1915 | switches::kDisableSavePasswordBubble) |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1916 | }, |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1917 | { |
| 1918 | "enable-apps-file-associations", |
| 1919 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME, |
| 1920 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION, |
| 1921 | kOsMac, |
| 1922 | SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations) |
| 1923 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1924 | #if defined(OS_ANDROID) |
| 1925 | { |
| 1926 | "enable-embeddedsearch-api", |
| 1927 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME, |
| 1928 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION, |
| 1929 | kOsAndroid, |
| 1930 | SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) |
| 1931 | }, |
| 1932 | #endif |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1933 | { |
| 1934 | "distance-field-text", |
| 1935 | IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME, |
| 1936 | IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION, |
| 1937 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1938 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText, |
| 1939 | switches::kDisableDistanceFieldText) |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1940 | }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 1941 | { |
| 1942 | "extension-content-verification", |
| 1943 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME, |
| 1944 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION, |
| 1945 | kOsDesktop, |
| 1946 | MULTI_VALUE_TYPE(kExtensionContentVerificationChoices) |
| 1947 | }, |
[email protected] | 8f374ce | 2014-05-08 23:51:52 | [diff] [blame] | 1948 | #if defined(USE_AURA) |
| 1949 | { |
| 1950 | "text-input-focus-manager", |
| 1951 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME, |
| 1952 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION, |
| 1953 | kOsCrOS | kOsLinux | kOsWin, |
| 1954 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager, |
| 1955 | switches::kDisableTextInputFocusManager) |
| 1956 | }, |
| 1957 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1958 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9858541 | 2014-05-13 19:01:37 | [diff] [blame] | 1959 | { |
| 1960 | "extension-active-script-permission", |
| 1961 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME, |
| 1962 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION, |
| 1963 | kOsAll, |
| 1964 | SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction) |
| 1965 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1966 | #endif |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1967 | { |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 1968 | "answers-in-suggest", |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1969 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME, |
| 1970 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION, |
dschuyler | caad9623 | 2015-04-13 22:22:50 | [diff] [blame] | 1971 | kOsAndroid | kOsDesktop, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 1972 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest, |
| 1973 | switches::kDisableAnswersInSuggest) |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1974 | }, |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 1975 | #if defined(OS_ANDROID) |
| 1976 | { |
| 1977 | "enable-data-reduction-proxy-dev", |
| 1978 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME, |
| 1979 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION, |
| 1980 | kOsAndroid, |
| 1981 | ENABLE_DISABLE_VALUE_TYPE( |
| 1982 | data_reduction_proxy::switches::kEnableDataReductionProxyDev, |
| 1983 | data_reduction_proxy::switches::kDisableDataReductionProxyDev) |
| 1984 | }, |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 1985 | { |
| 1986 | "enable-data-reduction-proxy-alt", |
| 1987 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME, |
| 1988 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION, |
| 1989 | kOsAndroid, |
| 1990 | SINGLE_VALUE_TYPE( |
| 1991 | data_reduction_proxy::switches::kEnableDataReductionProxyAlt) |
| 1992 | }, |
jeremyim | 0fb07f9 | 2015-06-03 21:50:31 | [diff] [blame] | 1993 | { |
| 1994 | "enable-data-reduction-proxy-carrier-test", |
| 1995 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME, |
| 1996 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION, |
| 1997 | kOsAndroid, |
| 1998 | SINGLE_VALUE_TYPE( |
| 1999 | data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest) |
| 2000 | }, |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2001 | #endif |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 2002 | { |
rlp | 69ebfce | 2014-11-18 21:03:46 | [diff] [blame] | 2003 | "enable-hotword-hardware", |
| 2004 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME, |
| 2005 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION, |
| 2006 | kOsCrOS, |
| 2007 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware) |
| 2008 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2009 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 409d920 | 2014-07-08 01:32:41 | [diff] [blame] | 2010 | { |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 2011 | "enable-embedded-extension-options", |
| 2012 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 2013 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 2014 | kOsDesktop, |
| 2015 | SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 2016 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2017 | #endif |
benwells | 89df419 | 2014-12-16 08:30:18 | [diff] [blame] | 2018 | #if defined(USE_ASH) |
| 2019 | { |
| 2020 | "enable-web-app-frame", |
| 2021 | IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME, |
| 2022 | IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION, |
| 2023 | kOsWin | kOsCrOS, |
| 2024 | SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame) |
| 2025 | }, |
| 2026 | #endif |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 2027 | { |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 2028 | "enable-drop-sync-credential", |
| 2029 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
| 2030 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
| 2031 | kOsAll, |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2032 | ENABLE_DISABLE_VALUE_TYPE( |
| 2033 | password_manager::switches::kEnableDropSyncCredential, |
| 2034 | password_manager::switches::kDisableDropSyncCredential) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2035 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2036 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2037 | { |
| 2038 | "enable-extension-action-redesign", |
| 2039 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, |
| 2040 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, |
rdevlin.cronin | d187a83 | 2015-01-06 01:15:52 | [diff] [blame] | 2041 | kOsDesktop, |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 2042 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) |
| 2043 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 2044 | #endif |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 2045 | { |
| 2046 | "autofill-sync-credential", |
| 2047 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 2048 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 2049 | kOsAll, |
| 2050 | MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 2051 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 2052 | #if !defined(OS_ANDROID) |
| 2053 | { |
| 2054 | "enable-message-center-always-scroll-up-upon-notification-removal", |
| 2055 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, |
| 2056 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, |
| 2057 | kOsDesktop, |
| 2058 | SINGLE_VALUE_TYPE( |
| 2059 | switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval) |
| 2060 | }, |
orenb | 5ee85fa | 2015-02-04 20:03:57 | [diff] [blame] | 2061 | { |
| 2062 | "enable-md-settings", |
| 2063 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME, |
| 2064 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION, |
| 2065 | kOsDesktop, |
| 2066 | SINGLE_VALUE_TYPE( |
| 2067 | switches::kEnableMaterialDesignSettings) |
| 2068 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 2069 | #endif |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 2070 | #if defined(OS_CHROMEOS) |
| 2071 | { |
skuhne | d17538a | 2015-01-15 15:53:09 | [diff] [blame] | 2072 | "disable-memory-pressure-chromeos", |
| 2073 | IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME, |
| 2074 | IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION, |
skuhne | f3f301b | 2014-12-10 21:04:14 | [diff] [blame] | 2075 | kOsCrOS, |
skuhne | d17538a | 2015-01-15 15:53:09 | [diff] [blame] | 2076 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS) |
skuhne | f3f301b | 2014-12-10 21:04:14 | [diff] [blame] | 2077 | }, |
| 2078 | { |
skuhne | f6f74b0 | 2015-01-22 00:05:34 | [diff] [blame] | 2079 | "memory-pressure-thresholds", |
| 2080 | IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME, |
| 2081 | IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION, |
| 2082 | kOsCrOS, |
| 2083 | MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices) |
| 2084 | }, |
| 2085 | { |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 2086 | "wake-on-packets", |
| 2087 | IDS_FLAGS_WAKE_ON_PACKETS_NAME, |
| 2088 | IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION, |
| 2089 | kOsCrOSOwnerOnly, |
| 2090 | SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets) |
| 2091 | }, |
| 2092 | #endif // OS_CHROMEOS |
miu | 094342f | 2014-09-26 03:09:46 | [diff] [blame] | 2093 | { |
| 2094 | "enable-tab-audio-muting", |
| 2095 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME, |
| 2096 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION, |
miu | 2178ec8 | 2014-11-01 01:59:06 | [diff] [blame] | 2097 | kOsDesktop, |
miu | 094342f | 2014-09-26 03:09:46 | [diff] [blame] | 2098 | SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting) |
| 2099 | }, |
mkwst | 531d29fa | 2014-10-02 09:42:07 | [diff] [blame] | 2100 | { |
| 2101 | "enable-credential-manager-api", |
| 2102 | IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME, |
| 2103 | IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION, |
| 2104 | kOsAll, |
| 2105 | SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI) |
| 2106 | }, |
mkwst | ae2d6039 | 2014-11-11 07:41:45 | [diff] [blame] | 2107 | { |
| 2108 | "reduced-referrer-granularity", |
| 2109 | IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME, |
| 2110 | IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION, |
| 2111 | kOsAll, |
| 2112 | SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity) |
| 2113 | }, |
tommycli | 3c366b3 | 2014-10-06 23:05:46 | [diff] [blame] | 2114 | #if defined(ENABLE_PLUGINS) |
| 2115 | { |
| 2116 | "enable-plugin-power-saver", |
| 2117 | IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME, |
| 2118 | IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION, |
| 2119 | kOsDesktop, |
dbeam | 155ac97 | 2015-04-20 15:34:48 | [diff] [blame] | 2120 | ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver, |
| 2121 | plugins::switches::kDisablePluginPowerSaver) |
tommycli | 3c366b3 | 2014-10-06 23:05:46 | [diff] [blame] | 2122 | }, |
| 2123 | #endif |
kelvinp | 3b73f509 | 2014-10-07 21:49:39 | [diff] [blame] | 2124 | #if defined(OS_CHROMEOS) |
| 2125 | { |
mtomasz | 644ca40 | 2014-10-30 00:51:37 | [diff] [blame] | 2126 | "disable-new-zip-unpacker", |
| 2127 | IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME, |
| 2128 | IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION, |
| 2129 | kOsCrOS, |
| 2130 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker) |
agl | 0a4a1634 | 2014-11-05 04:17:05 | [diff] [blame] | 2131 | }, |
kelvinp | 3b73f509 | 2014-10-07 21:49:39 | [diff] [blame] | 2132 | #endif // defined(OS_CHROMEOS) |
agl | 0a4a1634 | 2014-11-05 04:17:05 | [diff] [blame] | 2133 | { |
rouslan | 497109da | 2014-11-26 20:30:34 | [diff] [blame] | 2134 | "enable-credit-card-scan", |
| 2135 | IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME, |
| 2136 | IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION, |
| 2137 | kOsAndroid, |
rouslan | b3361bca | 2014-12-10 23:26:44 | [diff] [blame] | 2138 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan, |
| 2139 | autofill::switches::kDisableCreditCardScan) |
rouslan | 497109da | 2014-11-26 20:30:34 | [diff] [blame] | 2140 | }, |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2141 | #if defined(OS_CHROMEOS) |
| 2142 | { |
alemate | 2a7034b6 | 2015-04-01 16:06:25 | [diff] [blame] | 2143 | "disable-captive-portal-bypass-proxy", |
| 2144 | IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME, |
| 2145 | IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION, |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2146 | kOsCrOS, |
alemate | 2a7034b6 | 2015-04-01 16:06:25 | [diff] [blame] | 2147 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy) |
alemate | 94e69ad | 2014-11-27 17:30:28 | [diff] [blame] | 2148 | }, |
| 2149 | #endif // defined(OS_CHROMEOS) |
rsesek | a30ebba | 2014-12-01 21:55:54 | [diff] [blame] | 2150 | #if defined(OS_ANDROID) |
| 2151 | { |
| 2152 | "enable-seccomp-filter-sandbox", |
| 2153 | IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME, |
| 2154 | IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION, |
| 2155 | kOsAndroid, |
| 2156 | SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox) |
| 2157 | }, |
| 2158 | #endif |
lanwei | d74bc3e1 | 2014-12-03 23:12:29 | [diff] [blame] | 2159 | { |
| 2160 | "enable-touch-hover", |
| 2161 | IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME, |
| 2162 | IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION, |
| 2163 | kOsAndroid, |
| 2164 | SINGLE_VALUE_TYPE("enable-touch-hover") |
| 2165 | }, |
jww | 2035507 | 2014-12-12 21:00:55 | [diff] [blame] | 2166 | { |
| 2167 | "enable-fill-on-account-select", |
| 2168 | IDS_FILL_ON_ACCOUNT_SELECT_NAME, |
| 2169 | IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, |
| 2170 | kOsAll, |
jww | c3ab6e7b | 2014-12-23 18:16:18 | [diff] [blame] | 2171 | MULTI_VALUE_TYPE(kFillOnAccountSelectChoices) |
jww | 2035507 | 2014-12-12 21:00:55 | [diff] [blame] | 2172 | }, |
quiche | 4ab4911 | 2015-01-05 18:07:49 | [diff] [blame] | 2173 | #if defined(OS_CHROMEOS) |
| 2174 | { |
| 2175 | "enable-wifi-credential-sync", // FLAGS:RECORD_UMA |
| 2176 | IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME, |
| 2177 | IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION, |
| 2178 | kOsCrOS, |
| 2179 | SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync) |
| 2180 | }, |
mkwst | 0554410 | 2015-01-10 20:26:16 | [diff] [blame] | 2181 | { |
| 2182 | "enable-potentially-annoying-security-features", |
| 2183 | IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME, |
| 2184 | IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, |
| 2185 | kOsAll, |
| 2186 | SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures) |
| 2187 | }, |
quiche | 4ab4911 | 2015-01-05 18:07:49 | [diff] [blame] | 2188 | #endif |
bjornv | 3a1fa64 | 2015-01-13 09:19:01 | [diff] [blame] | 2189 | { |
bjornv | 7f74ea2 | 2015-05-08 13:04:05 | [diff] [blame] | 2190 | "disable-delay-agnostic-aec", |
| 2191 | IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME, |
| 2192 | IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION, |
| 2193 | kOsDesktop, |
| 2194 | SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec) |
| 2195 | }, |
| 2196 | { |
bjornv | 3a1fa64 | 2015-01-13 09:19:01 | [diff] [blame] | 2197 | "enable-delay-agnostic-aec", |
| 2198 | IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME, |
| 2199 | IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION, |
| 2200 | kOsDesktop, |
| 2201 | SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec) |
| 2202 | }, |
palmer | 601fe3c | 2015-01-23 20:43:02 | [diff] [blame] | 2203 | { |
| 2204 | "mark-non-secure-as", // FLAGS:RECORD_UMA |
| 2205 | IDS_MARK_NON_SECURE_AS_NAME, |
| 2206 | IDS_MARK_NON_SECURE_AS_DESCRIPTION, |
| 2207 | kOsAll, |
| 2208 | MULTI_VALUE_TYPE(kMarkNonSecureAsChoices) |
| 2209 | }, |
dcheng | e52b234 | 2015-01-27 22:45:42 | [diff] [blame] | 2210 | { |
| 2211 | "enable-site-per-process", |
| 2212 | IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME, |
| 2213 | IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION, |
| 2214 | kOsAll, |
| 2215 | SINGLE_VALUE_TYPE(switches::kSitePerProcess) |
| 2216 | }, |
derat | a55b0115d | 2015-02-03 01:59:08 | [diff] [blame] | 2217 | #if defined(OS_MACOSX) |
| 2218 | { |
| 2219 | "enable-harfbuzz-rendertext", |
| 2220 | IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME, |
| 2221 | IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION, |
| 2222 | kOsMac, |
| 2223 | SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText) |
| 2224 | }, |
| 2225 | #endif // defined(OS_MACOSX) |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2226 | #if defined(OS_CHROMEOS) |
| 2227 | { |
alemate | be310d4a | 2015-02-06 17:28:57 | [diff] [blame] | 2228 | "disable-timezone-tracking", |
| 2229 | IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME, |
| 2230 | IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2231 | kOsCrOS, |
alemate | be310d4a | 2015-02-06 17:28:57 | [diff] [blame] | 2232 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption) |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2233 | }, |
ginkage | 716cae5b | 2015-03-13 09:26:02 | [diff] [blame] | 2234 | { |
| 2235 | "disable-webview-signin-flow", |
| 2236 | IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME, |
| 2237 | IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION, |
| 2238 | kOsCrOS, |
| 2239 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow) |
| 2240 | }, |
alemate | 48255f3d | 2015-01-30 18:11:41 | [diff] [blame] | 2241 | #endif // defined(OS_CHROMEOS) |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2242 | { |
megjablon | 3bd89f3 | 2015-06-11 20:01:55 | [diff] [blame] | 2243 | "data-reduction-proxy-lo-fi", |
| 2244 | IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME, |
| 2245 | IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION, |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2246 | kOsAll, |
megjablon | 3bd89f3 | 2015-06-11 20:01:55 | [diff] [blame] | 2247 | MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices) |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2248 | }, |
kundaji | 0cf4c5c | 2015-03-17 17:35:03 | [diff] [blame] | 2249 | { |
| 2250 | "clear-data-reduction-proxy-data-savings", |
| 2251 | IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME, |
| 2252 | IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION, |
| 2253 | kOsAll, |
| 2254 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2255 | kClearDataReductionProxyDataSavings) |
| 2256 | }, |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2257 | #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2258 | { |
| 2259 | "enable-data-reduction-proxy-bypass-warnings", |
| 2260 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME, |
| 2261 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION, |
| 2262 | kOsAndroid, |
| 2263 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2264 | kEnableDataReductionProxyBypassWarning) |
| 2265 | }, |
| 2266 | #endif |
estark | 4b003b33 | 2015-02-14 01:07:05 | [diff] [blame] | 2267 | { |
| 2268 | "allow-insecure-localhost", |
| 2269 | IDS_ALLOW_INSECURE_LOCALHOST, |
| 2270 | IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION, |
| 2271 | kOsAll, |
| 2272 | SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost) |
| 2273 | }, |
benwells | 2367f430 | 2015-02-16 03:46:51 | [diff] [blame] | 2274 | { |
dominickn | 351d6b2 | 2015-05-29 01:16:05 | [diff] [blame] | 2275 | "enable-add-to-shelf", |
| 2276 | IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME, |
| 2277 | IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION, |
| 2278 | kOsDesktop, |
| 2279 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf, |
| 2280 | switches::kDisableAddToShelf) |
| 2281 | }, |
| 2282 | { |
benwells | 2367f430 | 2015-02-16 03:46:51 | [diff] [blame] | 2283 | "bypass-app-banner-engagement-checks", |
| 2284 | IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME, |
| 2285 | IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION, |
dominickn | 351d6b2 | 2015-05-29 01:16:05 | [diff] [blame] | 2286 | kOsAll, |
benwells | 2367f430 | 2015-02-16 03:46:51 | [diff] [blame] | 2287 | SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks) |
| 2288 | }, |
estade | e7acd2db | 2015-02-19 17:57:09 | [diff] [blame] | 2289 | { |
| 2290 | "use-sync-sandbox", |
| 2291 | IDS_FLAGS_SYNC_SANDBOX_NAME, |
| 2292 | IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION, |
| 2293 | kOsAll, |
| 2294 | SINGLE_VALUE_TYPE_AND_VALUE( |
| 2295 | switches::kSyncServiceURL, |
| 2296 | "https://chrome-sync.sandbox.google.com/chrome-sync/alpha") |
| 2297 | }, |
treib | 5b73268 | 2015-03-10 14:19:19 | [diff] [blame] | 2298 | { |
| 2299 | "enable-child-account-detection", |
| 2300 | IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME, |
| 2301 | IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION, |
| 2302 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 2303 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection, |
| 2304 | switches::kDisableChildAccountDetection) |
| 2305 | }, |
alexst | 24a14a32 | 2015-03-10 21:06:09 | [diff] [blame] | 2306 | #if defined(OS_CHROMEOS) && defined(USE_OZONE) |
| 2307 | { |
| 2308 | "ozone-test-single-overlay-support", |
| 2309 | IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY, |
| 2310 | IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION, |
| 2311 | kOsCrOS, |
| 2312 | SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport) |
| 2313 | }, |
| 2314 | #endif // defined(OS_CHROMEOS) && defined(USE_OZONE) |
amistry | 3f8e83b | 2015-03-13 07:31:51 | [diff] [blame] | 2315 | { |
| 2316 | "v8-pac-mojo-out-of-process", |
| 2317 | IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME, |
| 2318 | IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION, |
| 2319 | kOsDesktop, |
amistry | 5cd812f | 2015-05-15 19:53:31 | [diff] [blame] | 2320 | ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess, |
| 2321 | switches::kDisableOutOfProcessPac) |
amistry | 3f8e83b | 2015-03-13 07:31:51 | [diff] [blame] | 2322 | }, |
mfoltz | 150bb8b | 2015-04-09 22:30:05 | [diff] [blame] | 2323 | #if defined(ENABLE_MEDIA_ROUTER) |
apacible | 4a0e88b | 2015-03-21 01:13:15 | [diff] [blame] | 2324 | { |
| 2325 | "enable-media-router", |
| 2326 | IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME, |
| 2327 | IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION, |
| 2328 | kOsAll, |
| 2329 | SINGLE_VALUE_TYPE(switches::kEnableMediaRouter) |
estark | 93272ab | 2015-03-25 23:54:01 | [diff] [blame] | 2330 | }, |
mfoltz | 150bb8b | 2015-04-09 22:30:05 | [diff] [blame] | 2331 | #endif // defined(ENABLE_MEDIA_ROUTER) |
yawano | af1ed79 | 2015-04-02 05:48:19 | [diff] [blame] | 2332 | // Since kEnableLauncherSearchProviderApi is not available when app list is |
| 2333 | // disabled, flag guard enable-launcher-search-provider-api. |
| 2334 | #if defined(ENABLE_APP_LIST) |
| 2335 | { |
| 2336 | "enable-launcher-search-provider-api", |
| 2337 | IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API, |
| 2338 | IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API_DESCRIPTION, |
| 2339 | kOsCrOS, |
| 2340 | SINGLE_VALUE_TYPE(app_list::switches::kEnableLauncherSearchProviderApi) |
| 2341 | }, |
| 2342 | #endif // defined(ENABLE_APP_LIST) |
yawano | e6a41b1 | 2015-04-03 07:51:59 | [diff] [blame] | 2343 | #if defined(OS_CHROMEOS) |
| 2344 | { |
yawano | 6c3dabc | 2015-05-07 05:35:15 | [diff] [blame] | 2345 | "disable-mtp-write-support", |
| 2346 | IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME, |
| 2347 | IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION, |
yawano | e6a41b1 | 2015-04-03 07:51:59 | [diff] [blame] | 2348 | kOsCrOS, |
yawano | 6c3dabc | 2015-05-07 05:35:15 | [diff] [blame] | 2349 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport) |
yawano | e6a41b1 | 2015-04-03 07:51:59 | [diff] [blame] | 2350 | }, |
| 2351 | #endif // defined(OS_CHROMEOS) |
glevin | 6ac071f7 | 2015-04-07 21:47:32 | [diff] [blame] | 2352 | #if defined(OS_CHROMEOS) |
| 2353 | { |
| 2354 | "enable-datasaver-prompt", |
| 2355 | IDS_FLAGS_DATASAVER_PROMPT_NAME, |
| 2356 | IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION, |
| 2357 | kOsCrOS, |
| 2358 | MULTI_VALUE_TYPE(kDataSaverPromptChoices) |
| 2359 | }, |
| 2360 | #endif // defined(OS_CHROMEOS) |
treib | e2082a0e | 2015-04-08 10:15:30 | [diff] [blame] | 2361 | { |
| 2362 | "supervised-user-safesites", |
| 2363 | IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME, |
| 2364 | IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION, |
| 2365 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 2366 | MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices) |
| 2367 | }, |
estade | b5efbab6 | 2015-04-28 18:07:42 | [diff] [blame] | 2368 | #if defined(OS_ANDROID) |
| 2369 | { |
| 2370 | "enable-autofill-keyboard-accessory-view", |
| 2371 | IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME, |
| 2372 | IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION, |
| 2373 | kOsAndroid, |
| 2374 | SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView) |
| 2375 | }, |
| 2376 | #endif // defined(OS_ANDROID) |
dalecurtis | f28f0e5 | 2015-05-01 07:08:25 | [diff] [blame] | 2377 | { |
dalecurtis | 70c8cfa | 2015-05-05 19:58:50 | [diff] [blame] | 2378 | "disable-new-video-renderer", |
| 2379 | IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_NAME, |
| 2380 | IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_DESCRIPTION, |
dalecurtis | f28f0e5 | 2015-05-01 07:08:25 | [diff] [blame] | 2381 | kOsAll, |
dalecurtis | 70c8cfa | 2015-05-05 19:58:50 | [diff] [blame] | 2382 | SINGLE_VALUE_TYPE(switches::kDisableNewVideoRenderer) |
dalecurtis | f28f0e5 | 2015-05-01 07:08:25 | [diff] [blame] | 2383 | }, |
tbarzic | cd286fd | 2015-05-15 16:57:22 | [diff] [blame] | 2384 | #if defined(OS_CHROMEOS) |
| 2385 | { |
| 2386 | "enable-printer-app-search", |
| 2387 | IDS_FLAGS_PRINTER_PROVIDER_SEARCH_APP_NAME, |
| 2388 | IDS_FLAGS_PRINTER_PROVIDER_SEARCH_APP_DESCRIPTION, |
| 2389 | kOsCrOS, |
| 2390 | SINGLE_VALUE_TYPE(chromeos::switches::kEnablePrinterAppSearch) |
| 2391 | }, |
| 2392 | #endif // OS_CHROMEOS |
rbyers | 3f362dc | 2015-05-07 16:20:31 | [diff] [blame] | 2393 | // Temporary flag to ease the transition to standard-compliant scrollTop |
| 2394 | // behavior. Will be removed shortly after http://crbug.com/157855 ships. |
| 2395 | { |
| 2396 | "scroll-top-left-interop", |
| 2397 | IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME, |
| 2398 | IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION, |
| 2399 | kOsAll, |
| 2400 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 2401 | switches::kEnableBlinkFeatures, "ScrollTopLeftInterop", |
| 2402 | switches::kDisableBlinkFeatures, "ScrollTopLeftInterop") |
dalecurtis | 8e5e2f4 | 2015-05-13 17:16:46 | [diff] [blame] | 2403 | }, |
| 2404 | #if defined(OS_WIN) |
| 2405 | { |
| 2406 | "try-supported-channel-layouts", |
| 2407 | IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME, |
| 2408 | IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION, |
| 2409 | kOsWin, |
| 2410 | SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts) |
| 2411 | }, |
| 2412 | #endif |
mpearson | 2a18bc7 | 2015-05-25 05:37:10 | [diff] [blame] | 2413 | { |
| 2414 | "emphasize-titles-in-omnibox-dropdown", |
| 2415 | IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME, |
| 2416 | IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION, |
| 2417 | kOsAll, |
| 2418 | SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown) |
| 2419 | }, |
jbauch | 7100770 | 2015-06-02 14:00:07 | [diff] [blame] | 2420 | #if defined(ENABLE_WEBRTC) |
| 2421 | { |
| 2422 | "enable-webrtc-dtls12", |
| 2423 | IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME, |
| 2424 | IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION, |
| 2425 | kOsAll, |
| 2426 | SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12) |
| 2427 | }, |
| 2428 | #endif |
tapted | cafe3b9 | 2015-06-03 21:57:36 | [diff] [blame] | 2429 | #if defined(OS_MACOSX) |
| 2430 | { |
| 2431 | "app-info-dialog", |
| 2432 | IDS_FLAGS_APP_INFO_DIALOG_NAME, |
| 2433 | IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION, |
| 2434 | kOsMac, |
| 2435 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac, |
| 2436 | switches::kDisableAppInfoDialogMac) |
| 2437 | }, |
jackhou | 4bcdf7e | 2015-06-10 01:26:29 | [diff] [blame] | 2438 | { |
| 2439 | "mac-views-native-app-windows", |
| 2440 | IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME, |
| 2441 | IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION, |
| 2442 | kOsMac, |
| 2443 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows, |
| 2444 | switches::kDisableMacViewsNativeAppWindows) |
| 2445 | }, |
tapted | cafe3b9 | 2015-06-03 21:57:36 | [diff] [blame] | 2446 | #endif |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2447 | // NOTE: Adding new command-line switches requires adding corresponding |
| 2448 | // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2449 | // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 2450 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2451 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2452 | const Experiment* experiments = kExperiments; |
| 2453 | size_t num_experiments = arraysize(kExperiments); |
| 2454 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2455 | // Stores and encapsulates the little state that about:flags has. |
| 2456 | class FlagsState { |
| 2457 | public: |
| 2458 | FlagsState() : needs_restart_(false) {} |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2459 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2460 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2461 | SentinelsMode sentinels); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2462 | bool IsRestartNeededToCommitChanges(); |
| 2463 | void SetExperimentEnabled( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2464 | FlagsStorage* flags_storage, |
| 2465 | const std::string& internal_name, |
| 2466 | bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2467 | void RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2468 | std::map<std::string, base::CommandLine::StringType>* switch_list); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2469 | void ResetAllFlags(FlagsStorage* flags_storage); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2470 | void reset(); |
| 2471 | |
| 2472 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2473 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2474 | return Singleton<FlagsState>::get(); |
| 2475 | } |
| 2476 | |
| 2477 | private: |
| 2478 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2479 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2480 | |
| 2481 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 2482 | }; |
| 2483 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2484 | // Adds the internal names for the specified experiment to |names|. |
| 2485 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 2486 | if (e.type == Experiment::SINGLE_VALUE) { |
| 2487 | names->insert(e.internal_name); |
| 2488 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2489 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 2490 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2491 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2492 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2493 | } |
| 2494 | } |
| 2495 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2496 | // Confirms that an experiment is valid, used in a DCHECK in |
| 2497 | // SanitizeList below. |
| 2498 | bool ValidateExperiment(const Experiment& e) { |
| 2499 | switch (e.type) { |
| 2500 | case Experiment::SINGLE_VALUE: |
| 2501 | DCHECK_EQ(0, e.num_choices); |
| 2502 | DCHECK(!e.choices); |
| 2503 | break; |
| 2504 | case Experiment::MULTI_VALUE: |
| 2505 | DCHECK_GT(e.num_choices, 0); |
| 2506 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2507 | DCHECK(e.choices[0].command_line_switch); |
| 2508 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2509 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2510 | case Experiment::ENABLE_DISABLE_VALUE: |
| 2511 | DCHECK_EQ(3, e.num_choices); |
| 2512 | DCHECK(!e.choices); |
| 2513 | DCHECK(e.command_line_switch); |
| 2514 | DCHECK(e.command_line_value); |
| 2515 | DCHECK(e.disable_command_line_switch); |
| 2516 | DCHECK(e.disable_command_line_value); |
| 2517 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2518 | default: |
| 2519 | NOTREACHED(); |
| 2520 | } |
| 2521 | return true; |
| 2522 | } |
| 2523 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2524 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 2525 | // unknown, to prevent this list to become very long as experiments are added |
| 2526 | // and removed. |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2527 | void SanitizeList(FlagsStorage* flags_storage) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2528 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2529 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2530 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2531 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2532 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2533 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2534 | std::set<std::string> enabled_experiments = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2535 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2536 | std::set<std::string> new_enabled_experiments = |
| 2537 | base::STLSetIntersection<std::set<std::string> >( |
| 2538 | known_experiments, enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2539 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2540 | if (new_enabled_experiments != enabled_experiments) |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2541 | flags_storage->SetFlags(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2542 | } |
| 2543 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2544 | void GetSanitizedEnabledFlags( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2545 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2546 | SanitizeList(flags_storage); |
| 2547 | *result = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2548 | } |
| 2549 | |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2550 | bool SkipConditionalExperiment(const Experiment& experiment, |
| 2551 | FlagsStorage* flags_storage) { |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2552 | #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2553 | chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 2554 | #endif |
| 2555 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2556 | #if defined(OS_ANDROID) |
bolian | 44ee3baf | 2014-10-01 02:41:54 | [diff] [blame] | 2557 | // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel. |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2558 | if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2559 | channel != chrome::VersionInfo::CHANNEL_BETA && |
| 2560 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2561 | return true; |
| 2562 | } |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 2563 | // enable-data-reduction-proxy-alt is only available for the Dev channel. |
| 2564 | if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2565 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
bengr | 470a859 | 2014-10-24 00:31:48 | [diff] [blame] | 2566 | return true; |
| 2567 | } |
megjablon | 3bd89f3 | 2015-06-11 20:01:55 | [diff] [blame] | 2568 | // data-reduction-proxy-lo-fi is only available for Chromium builds and |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2569 | // the Canary/Dev channel. |
megjablon | 3bd89f3 | 2015-06-11 20:01:55 | [diff] [blame] | 2570 | if (!strcmp("data-reduction-proxy-lo-fi", experiment.internal_name) && |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2571 | channel != chrome::VersionInfo::CHANNEL_DEV && |
| 2572 | channel != chrome::VersionInfo::CHANNEL_CANARY && |
| 2573 | channel != chrome::VersionInfo::CHANNEL_UNKNOWN) { |
| 2574 | return true; |
| 2575 | } |
jeremyim | 0fb07f9 | 2015-06-03 21:50:31 | [diff] [blame] | 2576 | // enable-data-reduction-proxy-carrier-test is only available for Chromium |
| 2577 | // builds and the Canary/Dev channel. |
| 2578 | if (!strcmp("enable-data-reduction-proxy-carrier-test", |
| 2579 | experiment.internal_name) && |
| 2580 | channel != chrome::VersionInfo::CHANNEL_DEV && |
| 2581 | channel != chrome::VersionInfo::CHANNEL_CANARY && |
| 2582 | channel != chrome::VersionInfo::CHANNEL_UNKNOWN) { |
| 2583 | return true; |
| 2584 | } |
megjablon | 5effca2e | 2015-02-13 23:54:07 | [diff] [blame] | 2585 | #endif |
| 2586 | |
| 2587 | #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 2588 | // enable-data-reduction-proxy-bypass-warning is only available for Chromium |
| 2589 | // builds and Canary/Dev channel. |
| 2590 | if (!strcmp("enable-data-reduction-proxy-bypass-warnings", |
| 2591 | experiment.internal_name) && |
| 2592 | channel != chrome::VersionInfo::CHANNEL_UNKNOWN && |
| 2593 | channel != chrome::VersionInfo::CHANNEL_CANARY && |
| 2594 | channel != chrome::VersionInfo::CHANNEL_DEV) { |
megjablon | 2fca699 | 2015-02-12 23:23:28 | [diff] [blame] | 2595 | return true; |
| 2596 | } |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2597 | #endif |
| 2598 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2599 | return false; |
| 2600 | } |
| 2601 | |
| 2602 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2603 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 2604 | // enabled on the current platform. |
| 2605 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2606 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2607 | GetSanitizedEnabledFlags(flags_storage, result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2608 | |
| 2609 | // Filter out any experiments that aren't enabled on the current platform. We |
| 2610 | // don't remove these from prefs else syncing to a platform with a different |
| 2611 | // set of experiments would be lossy. |
| 2612 | std::set<std::string> platform_experiments; |
| 2613 | int current_platform = GetCurrentPlatform(); |
| 2614 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2615 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2616 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 2617 | #if defined(OS_CHROMEOS) |
| 2618 | if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| 2619 | AddInternalName(experiments[i], &platform_experiments); |
| 2620 | #endif |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2621 | } |
| 2622 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2623 | std::set<std::string> new_enabled_experiments = |
| 2624 | base::STLSetIntersection<std::set<std::string> >( |
| 2625 | platform_experiments, *result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2626 | |
| 2627 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2628 | } |
| 2629 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2630 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2631 | base::Value* CreateChoiceData( |
| 2632 | const Experiment& experiment, |
| 2633 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2634 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 2635 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2636 | base::ListValue* result = new base::ListValue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2637 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2638 | base::DictionaryValue* value = new base::DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2639 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2640 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2641 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2642 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2643 | result->Append(value); |
| 2644 | } |
| 2645 | return result; |
| 2646 | } |
| 2647 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2648 | } // namespace |
| 2649 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2650 | std::string Experiment::NameForChoice(int index) const { |
| 2651 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2652 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2653 | DCHECK_LT(index, num_choices); |
| 2654 | return std::string(internal_name) + testing::kMultiSeparator + |
| 2655 | base::IntToString(index); |
| 2656 | } |
| 2657 | |
[email protected] | 9692015 | 2013-12-04 21:00:16 | [diff] [blame] | 2658 | base::string16 Experiment::DescriptionForChoice(int index) const { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2659 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2660 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2661 | DCHECK_LT(index, num_choices); |
| 2662 | int description_id; |
| 2663 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 2664 | const int kEnableDisableDescriptionIds[] = { |
| 2665 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 2666 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 2667 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 2668 | }; |
| 2669 | description_id = kEnableDisableDescriptionIds[index]; |
| 2670 | } else { |
| 2671 | description_id = choices[index].description_id; |
| 2672 | } |
| 2673 | return l10n_util::GetStringUTF16(description_id); |
| 2674 | } |
| 2675 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2676 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2677 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2678 | SentinelsMode sentinels) { |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2679 | FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2680 | command_line, |
| 2681 | sentinels); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2682 | } |
| 2683 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2684 | bool AreSwitchesIdenticalToCurrentCommandLine( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2685 | const base::CommandLine& new_cmdline, |
| 2686 | const base::CommandLine& active_cmdline, |
| 2687 | std::set<base::CommandLine::StringType>* out_difference) { |
| 2688 | std::set<base::CommandLine::StringType> new_flags = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2689 | ExtractFlagsFromCommandLine(new_cmdline); |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2690 | std::set<base::CommandLine::StringType> active_flags = |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2691 | ExtractFlagsFromCommandLine(active_cmdline); |
| 2692 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2693 | bool result = false; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2694 | // Needed because std::equal doesn't check if the 2nd set is empty. |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2695 | if (new_flags.size() == active_flags.size()) { |
| 2696 | result = |
| 2697 | std::equal(new_flags.begin(), new_flags.end(), active_flags.begin()); |
| 2698 | } |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2699 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2700 | if (out_difference && !result) { |
| 2701 | std::set_symmetric_difference( |
| 2702 | new_flags.begin(), |
| 2703 | new_flags.end(), |
| 2704 | active_flags.begin(), |
| 2705 | active_flags.end(), |
| 2706 | std::inserter(*out_difference, out_difference->begin())); |
| 2707 | } |
| 2708 | |
| 2709 | return result; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2710 | } |
| 2711 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2712 | void GetFlagsExperimentsData(FlagsStorage* flags_storage, |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2713 | FlagAccess access, |
| 2714 | base::ListValue* supported_experiments, |
| 2715 | base::ListValue* unsupported_experiments) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2716 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2717 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2718 | |
| 2719 | int current_platform = GetCurrentPlatform(); |
| 2720 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2721 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2722 | const Experiment& experiment = experiments[i]; |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2723 | if (SkipConditionalExperiment(experiment, flags_storage)) |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2724 | continue; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2725 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2726 | base::DictionaryValue* data = new base::DictionaryValue(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2727 | data->SetString("internal_name", experiment.internal_name); |
| 2728 | data->SetString("name", |
| 2729 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 2730 | data->SetString("description", |
| 2731 | l10n_util::GetStringUTF16( |
| 2732 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2733 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2734 | base::ListValue* supported_platforms = new base::ListValue(); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2735 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 2736 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2737 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2738 | switch (experiment.type) { |
| 2739 | case Experiment::SINGLE_VALUE: |
| 2740 | data->SetBoolean( |
| 2741 | "enabled", |
| 2742 | enabled_experiments.count(experiment.internal_name) > 0); |
| 2743 | break; |
| 2744 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2745 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2746 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 2747 | break; |
| 2748 | default: |
| 2749 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2750 | } |
| 2751 | |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2752 | bool supported = (experiment.supported_platforms & current_platform) != 0; |
| 2753 | #if defined(OS_CHROMEOS) |
| 2754 | if (access == kOwnerAccessToFlags && |
| 2755 | (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2756 | supported = true; |
| 2757 | } |
| 2758 | #endif |
| 2759 | if (supported) |
| 2760 | supported_experiments->Append(data); |
| 2761 | else |
| 2762 | unsupported_experiments->Append(data); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2763 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2764 | } |
| 2765 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2766 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2767 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2768 | } |
| 2769 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2770 | void SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2771 | const std::string& internal_name, |
| 2772 | bool enable) { |
| 2773 | FlagsState::GetInstance()->SetExperimentEnabled(flags_storage, |
| 2774 | internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2775 | } |
| 2776 | |
| 2777 | void RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2778 | std::map<std::string, base::CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2779 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2780 | } |
| 2781 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2782 | void ResetAllFlags(FlagsStorage* flags_storage) { |
| 2783 | FlagsState::GetInstance()->ResetAllFlags(flags_storage); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2784 | } |
| 2785 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2786 | int GetCurrentPlatform() { |
| 2787 | #if defined(OS_MACOSX) |
| 2788 | return kOsMac; |
| 2789 | #elif defined(OS_WIN) |
| 2790 | return kOsWin; |
| 2791 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 2792 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 2793 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2794 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 2795 | #elif defined(OS_ANDROID) |
| 2796 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2797 | #else |
| 2798 | #error Unknown platform |
| 2799 | #endif |
| 2800 | } |
| 2801 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2802 | void RecordUMAStatistics(FlagsStorage* flags_storage) { |
| 2803 | std::set<std::string> flags = flags_storage->GetFlags(); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2804 | for (const std::string& flag : flags) { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2805 | std::string action("AboutFlags_"); |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2806 | action += flag; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2807 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2808 | } |
| 2809 | // Since flag metrics are recorded every startup, add a tick so that the |
| 2810 | // stats can be made meaningful. |
| 2811 | if (flags.size()) |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2812 | content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick")); |
| 2813 | content::RecordAction(base::UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2814 | } |
| 2815 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 2816 | base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) { |
| 2817 | return static_cast<base::HistogramBase::Sample>( |
| 2818 | metrics::HashMetricName(switch_name)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2819 | } |
| 2820 | |
| 2821 | void ReportCustomFlags(const std::string& uma_histogram_hame, |
| 2822 | const std::set<std::string>& command_line_difference) { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2823 | for (const std::string& flag : command_line_difference) { |
| 2824 | int uma_id = about_flags::testing::kBadSwitchFormatHistogramId; |
brettw | 44ce0ec5 | 2015-06-12 01:57:57 | [diff] [blame] | 2825 | if (base::StartsWithASCII(flag, "--", true /* case_sensitive */)) { |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2826 | // Skip '--' before switch name. |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2827 | std::string switch_name(flag.substr(2)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2828 | |
| 2829 | // Kill value, if any. |
| 2830 | const size_t value_pos = switch_name.find('='); |
| 2831 | if (value_pos != std::string::npos) |
| 2832 | switch_name.resize(value_pos); |
| 2833 | |
| 2834 | uma_id = GetSwitchUMAId(switch_name); |
| 2835 | } else { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2836 | NOTREACHED() << "ReportCustomFlags(): flag '" << flag |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2837 | << "' has incorrect format."; |
| 2838 | } |
| 2839 | DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2840 | << "' '" << flag << "', uma_id=" << uma_id; |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2841 | |
| 2842 | // Sparse histogram macro does not cache the histogram, so it's safe |
| 2843 | // to use macro with non-static histogram name here. |
| 2844 | UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id); |
| 2845 | } |
| 2846 | } |
| 2847 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2848 | ////////////////////////////////////////////////////////////////////////////// |
| 2849 | // FlagsState implementation. |
| 2850 | |
| 2851 | namespace { |
| 2852 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2853 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 2854 | NameToSwitchAndValueMap; |
| 2855 | |
| 2856 | void SetFlagToSwitchMapping(const std::string& key, |
| 2857 | const std::string& switch_name, |
| 2858 | const std::string& switch_value, |
| 2859 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 2860 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 2861 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 2862 | } |
| 2863 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2864 | void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2865 | base::CommandLine* command_line, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2866 | SentinelsMode sentinels) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2867 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2868 | return; |
| 2869 | |
| 2870 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 2871 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2872 | GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, |
| 2873 | &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2874 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2875 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2876 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2877 | const Experiment& e = experiments[i]; |
| 2878 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2879 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 2880 | e.command_line_value, &name_to_switch_map); |
| 2881 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 2882 | for (int j = 0; j < e.num_choices; ++j) { |
| 2883 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 2884 | e.choices[j].command_line_switch, |
| 2885 | e.choices[j].command_line_value, |
| 2886 | &name_to_switch_map); |
| 2887 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2888 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2889 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 2890 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 2891 | &name_to_switch_map); |
| 2892 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 2893 | e.command_line_value, &name_to_switch_map); |
| 2894 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 2895 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2896 | } |
| 2897 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2898 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2899 | if (sentinels == kAddSentinels) { |
| 2900 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
| 2901 | flags_switches_.insert( |
| 2902 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 2903 | std::string())); |
| 2904 | } |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2905 | for (const std::string& experiment_name : enabled_experiments) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2906 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2907 | name_to_switch_map.find(experiment_name); |
| 2908 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 2909 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2910 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2911 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2912 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2913 | const std::pair<std::string, std::string>& |
| 2914 | switch_and_value_pair = name_to_switch_it->second; |
| 2915 | |
[email protected] | 9737b363 | 2013-08-26 09:23:23 | [diff] [blame] | 2916 | CHECK(!switch_and_value_pair.first.empty()); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2917 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 2918 | switch_and_value_pair.second); |
| 2919 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2920 | } |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2921 | if (sentinels == kAddSentinels) { |
| 2922 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
| 2923 | flags_switches_.insert( |
| 2924 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 2925 | std::string())); |
| 2926 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2927 | } |
| 2928 | |
| 2929 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 2930 | return needs_restart_; |
| 2931 | } |
| 2932 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2933 | void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2934 | const std::string& internal_name, |
| 2935 | bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2936 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2937 | if (at_index != std::string::npos) { |
| 2938 | DCHECK(enable); |
| 2939 | // We're being asked to enable a multi-choice experiment. Disable the |
| 2940 | // currently selected choice. |
| 2941 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2942 | const std::string experiment_name = internal_name.substr(0, at_index); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2943 | SetExperimentEnabled(flags_storage, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2944 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2945 | // And enable the new choice, if it is not the default first choice. |
| 2946 | if (internal_name != experiment_name + "@0") { |
| 2947 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2948 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2949 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2950 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2951 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2952 | return; |
| 2953 | } |
| 2954 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2955 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2956 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2957 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2958 | const Experiment* e = NULL; |
| 2959 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2960 | if (experiments[i].internal_name == internal_name) { |
| 2961 | e = experiments + i; |
| 2962 | break; |
| 2963 | } |
| 2964 | } |
| 2965 | DCHECK(e); |
| 2966 | |
| 2967 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2968 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2969 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2970 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2971 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2972 | } else { |
| 2973 | if (enable) { |
| 2974 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2975 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2976 | } else { |
| 2977 | // Find the currently enabled choice and disable it. |
| 2978 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2979 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2980 | if (enabled_experiments.find(choice_name) != |
| 2981 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2982 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2983 | enabled_experiments.erase(choice_name); |
| 2984 | // Continue on just in case there's a bug and more than one |
| 2985 | // experiment for this choice was enabled. |
| 2986 | } |
| 2987 | } |
| 2988 | } |
| 2989 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2990 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2991 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2992 | } |
| 2993 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2994 | void FlagsState::RemoveFlagsSwitches( |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 2995 | std::map<std::string, base::CommandLine::StringType>* switch_list) { |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 2996 | for (const auto& entry : flags_switches_) |
| 2997 | switch_list->erase(entry.first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2998 | } |
| 2999 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 3000 | void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) { |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 3001 | needs_restart_ = true; |
| 3002 | |
| 3003 | std::set<std::string> no_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 3004 | flags_storage->SetFlags(no_experiments); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 3005 | } |
| 3006 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3007 | void FlagsState::reset() { |
| 3008 | needs_restart_ = false; |
| 3009 | flags_switches_.clear(); |
| 3010 | } |
| 3011 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 3012 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3013 | |
| 3014 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 3015 | |
| 3016 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 3017 | // also need to update the html file. |
| 3018 | const char kMultiSeparator[] = "@"; |
| 3019 | |
asvitkine | bff63b2 | 2014-11-25 01:03:52 | [diff] [blame] | 3020 | const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3021 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3022 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 3023 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3024 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 3025 | |
| 3026 | void SetExperiments(const Experiment* e, size_t count) { |
| 3027 | if (!e) { |
| 3028 | experiments = kExperiments; |
| 3029 | num_experiments = arraysize(kExperiments); |
| 3030 | } else { |
| 3031 | experiments = e; |
| 3032 | num_experiments = count; |
| 3033 | } |
| 3034 | } |
| 3035 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 3036 | const Experiment* GetExperiments(size_t* count) { |
| 3037 | *count = num_experiments; |
| 3038 | return experiments; |
| 3039 | } |
| 3040 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 3041 | } // namespace testing |
| 3042 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 3043 | } // namespace about_flags |