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