[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" |
| 15 | #include "base/numerics/safe_conversions.h" |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 16 | #include "base/stl_util.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 17 | #include "base/strings/string_number_conversions.h" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 18 | #include "base/strings/string_util.h" |
[email protected] | 135cb80 | 2013-06-09 16:44:20 | [diff] [blame] | 19 | #include "base/strings/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 20 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 21 | #include "cc/base/switches.h" |
[email protected] | 1153455 | 2013-12-05 02:09:30 | [diff] [blame] | 22 | #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 23 | #include "chrome/browser/flags_storage.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 24 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 25 | #include "chrome/common/chrome_switches.h" |
[email protected] | af39f00 | 2014-08-22 10:18:18 | [diff] [blame] | 26 | #include "chrome/grit/generated_resources.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" |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 29 | #include "components/metrics/metrics_hashes.h" |
[email protected] | cbb22eb | 2013-06-24 23:53:10 | [diff] [blame] | 30 | #include "components/nacl/common/nacl_switches.h" |
[email protected] | 720b1049 | 2014-07-23 08:48:40 | [diff] [blame] | 31 | #include "components/search/search_switches.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 32 | #include "content/public/browser/user_metrics.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 33 | #include "media/base/media_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 34 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 35 | #include "ui/base/ui_base_switches.h" |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 36 | #include "ui/display/display_switches.h" |
[email protected] | a6147a2 | 2013-09-26 06:55:09 | [diff] [blame] | 37 | #include "ui/events/event_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 38 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 39 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 40 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | e3d512a7 | 2014-03-18 20:50:47 | [diff] [blame] | 41 | #include "ui/native_theme/native_theme_switches.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 42 | #include "ui/views/views_switches.h" |
[email protected] | 9a22457 | 2013-05-12 23:08:56 | [diff] [blame] | 43 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 44 | #if defined(OS_ANDROID) |
| 45 | #include "chrome/common/chrome_version_info.h" |
| 46 | #include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h" |
[email protected] | 4c583b6 | 2014-08-08 10:37:23 | [diff] [blame] | 47 | #include "components/omnibox/omnibox_switches.h" |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 48 | #else |
| 49 | #include "ui/message_center/message_center_switches.h" |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 50 | #endif |
| 51 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 52 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 53 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 54 | #endif |
| 55 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 56 | #if defined(OS_CHROMEOS) |
| 57 | #include "chromeos/chromeos_switches.h" |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 58 | #include "third_party/cros_system_api/switches/chrome_switches.h" |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 59 | #endif |
| 60 | |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 61 | #if defined(ENABLE_APP_LIST) |
| 62 | #include "ui/app_list/app_list_switches.h" |
| 63 | #endif |
| 64 | |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 65 | #if defined(ENABLE_EXTENSIONS) |
| 66 | #include "extensions/common/switches.h" |
| 67 | #endif |
| 68 | |
[email protected] | e6e30ac | 2014-01-13 21:24:39 | [diff] [blame] | 69 | using base::UserMetricsAction; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 70 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 71 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 72 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 73 | const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 74 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 75 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 76 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 77 | Experiment::SINGLE_VALUE, \ |
| 78 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 79 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 80 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 81 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 82 | disable_switch, disable_value) \ |
| 83 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 84 | disable_switch, disable_value, NULL, 3 |
| 85 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 86 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 87 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 88 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 89 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 90 | namespace { |
| 91 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 92 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 93 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 94 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 95 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 96 | // whether the experiment is available on that platform. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 97 | void AddOsStrings(unsigned bitmask, base::ListValue* list) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 98 | struct { |
| 99 | unsigned bit; |
| 100 | const char* const name; |
| 101 | } kBitsToOs[] = { |
| 102 | {kOsMac, "Mac"}, |
| 103 | {kOsWin, "Windows"}, |
| 104 | {kOsLinux, "Linux"}, |
| 105 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 106 | {kOsAndroid, "Android"}, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 107 | {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 108 | }; |
| 109 | for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
| 110 | if (bitmask & kBitsToOs[i].bit) |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 111 | list->Append(new base::StringValue(kBitsToOs[i].name)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 112 | } |
| 113 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 114 | // Convert switch constants to proper CommandLine::StringType strings. |
| 115 | CommandLine::StringType GetSwitchString(const std::string& flag) { |
| 116 | CommandLine cmd_line(CommandLine::NO_PROGRAM); |
| 117 | cmd_line.AppendSwitch(flag); |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 118 | DCHECK_EQ(2U, cmd_line.argv().size()); |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 119 | return cmd_line.argv()[1]; |
| 120 | } |
| 121 | |
| 122 | // Scoops flags from a command line. |
| 123 | std::set<CommandLine::StringType> ExtractFlagsFromCommandLine( |
| 124 | const CommandLine& cmdline) { |
| 125 | std::set<CommandLine::StringType> flags; |
| 126 | // First do the ones between --flag-switches-begin and --flag-switches-end. |
| 127 | CommandLine::StringVector::const_iterator first = |
| 128 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 129 | GetSwitchString(switches::kFlagSwitchesBegin)); |
| 130 | CommandLine::StringVector::const_iterator last = |
| 131 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 132 | GetSwitchString(switches::kFlagSwitchesEnd)); |
| 133 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 134 | flags.insert(first + 1, last); |
| 135 | #if defined(OS_CHROMEOS) |
| 136 | // Then add those between --policy-switches-begin and --policy-switches-end. |
| 137 | first = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 138 | GetSwitchString(chromeos::switches::kPolicySwitchesBegin)); |
| 139 | last = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 140 | GetSwitchString(chromeos::switches::kPolicySwitchesEnd)); |
| 141 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 142 | flags.insert(first + 1, last); |
| 143 | #endif |
| 144 | return flags; |
| 145 | } |
| 146 | |
piotaixr | bc9cd5f | 2014-08-26 22:24:14 | [diff] [blame] | 147 | const Experiment::Choice kEnableDisplayList2DcanvasChoices[] = { |
| 148 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 149 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 150 | switches::kEnableDisplayList2dCanvas, ""}, |
| 151 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 152 | switches::kDisableDisplayList2dCanvas, ""}, |
| 153 | }; |
| 154 | |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 155 | const Experiment::Choice kEnableCompositingForTransitionChoices[] = { |
| 156 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 157 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 158 | switches::kEnableCompositingForTransition, ""}, |
| 159 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 160 | switches::kDisableCompositingForTransition, ""}, |
| 161 | }; |
| 162 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 163 | const Experiment::Choice kTouchEventsChoices[] = { |
| 164 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 165 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 166 | switches::kTouchEvents, |
| 167 | switches::kTouchEventsEnabled }, |
| 168 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 169 | switches::kTouchEvents, |
| 170 | switches::kTouchEventsDisabled } |
| 171 | }; |
| 172 | |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 173 | #if defined(USE_AURA) |
| 174 | const Experiment::Choice kOverscrollHistoryNavigationChoices[] = { |
| 175 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, |
| 176 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 177 | switches::kOverscrollHistoryNavigation, |
| 178 | "0" }, |
| 179 | { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, |
| 180 | switches::kOverscrollHistoryNavigation, |
| 181 | "2" } |
| 182 | }; |
| 183 | #endif |
| 184 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 185 | #if !defined(DISABLE_NACL) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 186 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 187 | // 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] | 188 | // debug stub to a remote machine. Since secure shell uses NaCl, we usually |
| 189 | // want to avoid debugging that. The PNaCl translator is also a NaCl module, |
| 190 | // so by default we want to avoid debugging that. |
| 191 | // NOTE: As the default value must be the empty string, the mask excluding |
| 192 | // the PNaCl translator and secure shell is substituted elsewhere. |
| 193 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 194 | { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 195 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 196 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 197 | }; |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 198 | #endif |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 199 | |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 200 | const Experiment::Choice kImplSidePaintingChoices[] = { |
| 201 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 202 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 203 | switches::kEnableImplSidePainting, ""}, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 204 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 205 | switches::kDisableImplSidePainting, ""} |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 206 | }; |
| 207 | |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 208 | const Experiment::Choice kLCDTextChoices[] = { |
| 209 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 210 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""}, |
| 211 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""} |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 212 | }; |
| 213 | |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 214 | const Experiment::Choice kDistanceFieldTextChoices[] = { |
| 215 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 216 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 217 | switches::kEnableDistanceFieldText, "" }, |
| 218 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 219 | switches::kDisableDistanceFieldText, "" } |
| 220 | }; |
| 221 | |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 222 | #ifndef USE_AURA |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 223 | const Experiment::Choice kDelegatedRendererChoices[] = { |
| 224 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 225 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 226 | switches::kEnableDelegatedRenderer, ""}, |
| 227 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 228 | switches::kDisableDelegatedRenderer, ""} |
| 229 | }; |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 230 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 231 | |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 232 | const Experiment::Choice kMaxTilesForInterestAreaChoices[] = { |
| 233 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 234 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 235 | cc::switches::kMaxTilesForInterestArea, "64"}, |
| 236 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 237 | cc::switches::kMaxTilesForInterestArea, "128"}, |
| 238 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 239 | cc::switches::kMaxTilesForInterestArea, "256"}, |
| 240 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 241 | cc::switches::kMaxTilesForInterestArea, "512"} |
| 242 | }; |
| 243 | |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 244 | const Experiment::Choice kDefaultTileWidthChoices[] = { |
| 245 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 246 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT, |
| 247 | switches::kDefaultTileWidth, "128"}, |
| 248 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL, |
| 249 | switches::kDefaultTileWidth, "256"}, |
| 250 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE, |
| 251 | switches::kDefaultTileWidth, "512"}, |
| 252 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI, |
| 253 | switches::kDefaultTileWidth, "1024"} |
| 254 | }; |
| 255 | |
| 256 | const Experiment::Choice kDefaultTileHeightChoices[] = { |
| 257 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 258 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT, |
| 259 | switches::kDefaultTileHeight, "128"}, |
| 260 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL, |
| 261 | switches::kDefaultTileHeight, "256"}, |
| 262 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE, |
| 263 | switches::kDefaultTileHeight, "512"}, |
| 264 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI, |
| 265 | switches::kDefaultTileHeight, "1024"} |
| 266 | }; |
| 267 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 268 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
[email protected] | 9a3de3e3 | 2013-04-23 19:05:21 | [diff] [blame] | 269 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 270 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 271 | switches::kUseSimpleCacheBackend, "off" }, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 272 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 273 | switches::kUseSimpleCacheBackend, "on"} |
| 274 | }; |
| 275 | |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 276 | #if defined(USE_AURA) |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 277 | const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 278 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 279 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 280 | switches::kTabCaptureUpscaleQuality, "fast" }, |
| 281 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 282 | switches::kTabCaptureUpscaleQuality, "good" }, |
| 283 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 284 | switches::kTabCaptureUpscaleQuality, "best" }, |
| 285 | }; |
| 286 | |
| 287 | const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 288 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 289 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 290 | switches::kTabCaptureDownscaleQuality, "fast" }, |
| 291 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 292 | switches::kTabCaptureDownscaleQuality, "good" }, |
| 293 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 294 | switches::kTabCaptureDownscaleQuality, "best" }, |
| 295 | }; |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 296 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 297 | |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 298 | #if defined(USE_AURA) || defined(OS_LINUX) |
| 299 | const Experiment::Choice kOverlayScrollbarChoices[] = { |
| 300 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 301 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 302 | switches::kEnableOverlayScrollbar, ""}, |
| 303 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 304 | switches::kDisableOverlayScrollbar, ""} |
| 305 | }; |
| 306 | #endif |
| 307 | |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 308 | const Experiment::Choice kZeroCopyChoices[] = { |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 309 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 310 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 311 | switches::kEnableZeroCopy, ""}, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 312 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 313 | switches::kDisableZeroCopy, ""} |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 314 | }; |
| 315 | |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 316 | #if defined(OS_ANDROID) |
| 317 | const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 318 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 319 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 320 | switches::kEnableZeroSuggestMostVisited, ""}, |
| 321 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, |
| 322 | switches::kEnableZeroSuggestEtherSerp, ""}, |
| 323 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, |
| 324 | switches::kEnableZeroSuggestEtherNoSerp, ""}, |
[email protected] | 162c8d9fa | 2014-03-18 20:25:41 | [diff] [blame] | 325 | { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED, |
| 326 | switches::kEnableZeroSuggestPersonalized, ""}, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 327 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 328 | switches::kDisableZeroSuggest, ""} |
| 329 | }; |
| 330 | #endif |
| 331 | |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 332 | const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 333 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | 00d92d3 | 2014-01-23 09:46:50 | [diff] [blame] | 334 | { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 335 | { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 336 | { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 337 | { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 338 | }; |
| 339 | |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 340 | const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 341 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 342 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 343 | switches::kEnableGpuRasterization, "" }, |
| 344 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 345 | switches::kDisableGpuRasterization, "" }, |
| 346 | { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 347 | switches::kForceGpuRasterization, "" }, |
| 348 | }; |
| 349 | |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 350 | // We're using independent flags here (as opposed to a common flag with |
| 351 | // different values) to be able to enable/disable the entire experience |
| 352 | // associated with this feature server-side from the FieldTrial (the complete |
| 353 | // experience includes other flag changes as well). It is not currently possible |
| 354 | // to do that with "flag=value" flags. |
| 355 | const Experiment::Choice kSearchButtonInOmniboxChoices[] = { |
| 356 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 357 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 358 | switches::kDisableSearchButtonInOmnibox, ""}, |
| 359 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, |
| 360 | switches::kEnableSearchButtonInOmniboxForStr, ""}, |
| 361 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP, |
| 362 | switches::kEnableSearchButtonInOmniboxForStrOrIip, ""}, |
| 363 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED, |
| 364 | switches::kEnableSearchButtonInOmniboxAlways, ""} |
| 365 | }; |
| 366 | |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 367 | // See comment above for kSearchButtonInOmniboxChoices. The same reasoning |
| 368 | // applies here. |
| 369 | const Experiment::Choice kOriginChipChoices[] = { |
| 370 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 371 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""}, |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 372 | { IDS_FLAGS_ORIGIN_CHIP_ALWAYS, switches::kEnableOriginChipAlways, ""}, |
| 373 | { IDS_FLAGS_ORIGIN_CHIP_ON_SRP, switches::kEnableOriginChipOnSrp, ""} |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 374 | }; |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 375 | |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 376 | const Experiment::Choice kTouchScrollingModeChoices[] = { |
| 377 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 378 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL, |
| 379 | switches::kTouchScrollingMode, |
| 380 | switches::kTouchScrollingModeTouchcancel }, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 381 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 382 | switches::kTouchScrollingMode, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 383 | switches::kTouchScrollingModeAsyncTouchmove }, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 384 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE, |
| 385 | switches::kTouchScrollingMode, |
| 386 | switches::kTouchScrollingModeSyncTouchmove }, |
| 387 | }; |
| 388 | |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 389 | #if defined(ENABLE_APP_LIST) |
| 390 | const Experiment::Choice kEnableSyncAppListChoices[] = { |
| 391 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 392 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 393 | app_list::switches::kEnableSyncAppList, "" }, |
| 394 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 395 | app_list::switches::kDisableSyncAppList, "" }, |
| 396 | }; |
| 397 | #endif |
| 398 | |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 399 | const Experiment::Choice kExtensionContentVerificationChoices[] = { |
| 400 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 401 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 402 | switches::kExtensionContentVerification, |
| 403 | switches::kExtensionContentVerificationBootstrap }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 404 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 405 | switches::kExtensionContentVerification, |
| 406 | switches::kExtensionContentVerificationEnforce }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 407 | { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, |
[email protected] | 8bb6216 | 2014-06-23 09:45:50 | [diff] [blame] | 408 | switches::kExtensionContentVerification, |
| 409 | switches::kExtensionContentVerificationEnforceStrict }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 410 | }; |
| 411 | |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 412 | #if defined(OS_ANDROID) |
| 413 | const Experiment::Choice kAnswersInSuggestChoices[] = { |
| 414 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 415 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 416 | switches::kEnableAnswersInSuggest, ""}, |
| 417 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 418 | switches::kDisableAnswersInSuggest, ""} |
| 419 | }; |
| 420 | #endif |
| 421 | |
[email protected] | aae7957 | 2014-06-13 00:42:58 | [diff] [blame] | 422 | const Experiment::Choice kEnableSettingsWindowChoices[] = { |
| 423 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 424 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 425 | ::switches::kEnableSettingsWindow, "" }, |
| 426 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 427 | ::switches::kDisableSettingsWindow, "" }, |
| 428 | }; |
| 429 | |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 430 | // Note that the value is specified in seconds (where 0 is equivalent to |
| 431 | // disabled). |
| 432 | const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = { |
| 433 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 434 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 435 | switches::kRememberCertErrorDecisions, |
| 436 | "-1" }, |
| 437 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY, |
| 438 | switches::kRememberCertErrorDecisions, |
| 439 | "86400" }, |
| 440 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS, |
| 441 | switches::kRememberCertErrorDecisions, |
| 442 | "259200" }, |
| 443 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK, |
| 444 | switches::kRememberCertErrorDecisions, |
| 445 | "604800" }, |
| 446 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 447 | switches::kRememberCertErrorDecisions, |
| 448 | "2592000" }, |
| 449 | { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS, |
| 450 | switches::kRememberCertErrorDecisions, |
| 451 | "7776000" }, |
| 452 | }; |
| 453 | |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 454 | const Experiment::Choice kEnableDropSyncCredentialChoices[] = { |
| 455 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 456 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 457 | password_manager::switches::kEnableDropSyncCredential, "" }, |
| 458 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 459 | password_manager::switches::kDisableDropSyncCredential, "" }, |
| 460 | }; |
| 461 | |
[email protected] | 469ea5c | 2014-08-12 20:00:56 | [diff] [blame] | 462 | #if defined(OS_MACOSX) |
| 463 | const Experiment::Choice kEnableAVFoundationChoices[] = { |
| 464 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 465 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, |
| 466 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} |
| 467 | }; |
| 468 | #endif |
| 469 | |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 470 | const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 471 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 472 | { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 473 | password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 474 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 475 | password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 476 | { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 477 | password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 478 | }; |
| 479 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 480 | // RECORDING USER METRICS FOR FLAGS: |
| 481 | // ----------------------------------------------------------------------------- |
| 482 | // The first line of the experiment is the internal name. If you'd like to |
| 483 | // gather statistics about the usage of your flag, you should append a marker |
| 484 | // comment to the end of the feature name, like so: |
| 485 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 486 | // |
[email protected] | d8320fb6 | 2014-03-22 03:16:37 | [diff] [blame] | 487 | // After doing that, run |
| 488 | // tools/metrics/actions/extract_actions.py |
| 489 | // to add the metric to actions.xml (which will enable UMA to record your |
| 490 | // feature flag), then update the <owner>s and <description> sections. Make sure |
| 491 | // to include the actions.xml file when you upload your code for review! |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 492 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 493 | // After your feature has shipped under a flag, you can locate the metrics under |
| 494 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 495 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 496 | // get a sense of usage. Note that this will not be the same as number of users |
| 497 | // with a given feature enabled because users can quit and relaunch the |
| 498 | // application multiple times over a given time interval. The dashboard also |
| 499 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 500 | // last seven days. However, note that this is not the same as the number of |
| 501 | // users who have the flag enabled, since enabling the flag happens once, |
| 502 | // whereas running with the flag enabled happens until the user flips the flag |
| 503 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 504 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 505 | // To add a new experiment add to the end of kExperiments. There are two |
| 506 | // distinct types of experiments: |
| 507 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 508 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 509 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 510 | // deactivated state for this lab (i.e. no command line option). To specify |
| 511 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 512 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 513 | // See the documentation of Experiment for details on the fields. |
| 514 | // |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 515 | // Command-line switches must have entries in enum "LoginCustomFlags" in |
| 516 | // histograms.xml. See note in histograms.xml and don't forget to run |
| 517 | // AboutFlagsHistogramTest unit test to calculate and verify checksum. |
| 518 | // |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 519 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 520 | const Experiment kExperiments[] = { |
| 521 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 522 | "ignore-gpu-blacklist", |
| 523 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 524 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 525 | kOsAll, |
| 526 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 527 | }, |
| 528 | { |
[email protected] | 8560336 | 2014-04-21 16:18:14 | [diff] [blame] | 529 | "disable_layer_squashing", |
| 530 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME, |
| 531 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION, |
| 532 | kOsAll, |
| 533 | SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing) |
| 534 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 535 | #if defined(OS_WIN) |
| 536 | { |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 537 | "disable-direct-write", |
| 538 | IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME, |
| 539 | IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 540 | kOsWin, |
[email protected] | 5b263b6a | 2014-06-09 21:47:34 | [diff] [blame] | 541 | SINGLE_VALUE_TYPE(switches::kDisableDirectWrite) |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 542 | }, |
| 543 | #endif |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 544 | { |
[email protected] | 2b60875 | 2013-05-01 03:34:36 | [diff] [blame] | 545 | "enable-experimental-canvas-features", |
| 546 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME, |
| 547 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION, |
| 548 | kOsAll, |
| 549 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures) |
| 550 | }, |
| 551 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 552 | "disable-accelerated-2d-canvas", |
| 553 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 554 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 555 | kOsAll, |
| 556 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 557 | }, |
| 558 | { |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 559 | "enable-display-list-2d-canvas", |
| 560 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME, |
| 561 | IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION, |
| 562 | kOsAll, |
piotaixr | bc9cd5f | 2014-08-26 22:24:14 | [diff] [blame] | 563 | MULTI_VALUE_TYPE(kEnableDisplayList2DcanvasChoices) |
[email protected] | 72d3735 | 2014-07-24 02:34:41 | [diff] [blame] | 564 | }, |
| 565 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 566 | "composited-layer-borders", |
| 567 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 568 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 569 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 570 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 571 | }, |
| 572 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 573 | "show-fps-counter", |
| 574 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 575 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 576 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 577 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 578 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 579 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 580 | "disable-webgl", |
| 581 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 582 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | 6c7784e | 2013-08-01 22:41:28 | [diff] [blame] | 583 | kOsAll, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 584 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 585 | }, |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 586 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 587 | "disable-webrtc", |
| 588 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 589 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 590 | kOsAndroid, |
| 591 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 592 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 593 | #else |
| 594 | SINGLE_VALUE_TYPE("") |
| 595 | #endif |
| 596 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 597 | #if defined(ENABLE_WEBRTC) |
[email protected] | d816ddc | 2013-05-23 14:28:30 | [diff] [blame] | 598 | { |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 599 | "disable-webrtc-hw-decoding", |
| 600 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME, |
| 601 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION, |
[email protected] | 6442b02 | 2013-12-05 11:09:05 | [diff] [blame] | 602 | kOsAndroid | kOsCrOS, |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 603 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding) |
| 604 | }, |
| 605 | { |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 606 | "disable-webrtc-hw-encoding", |
| 607 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME, |
| 608 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION, |
[email protected] | 6998f01f2 | 2013-12-04 09:27:57 | [diff] [blame] | 609 | kOsAndroid | kOsCrOS, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 610 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding) |
| 611 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 612 | #endif |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 613 | #if defined(OS_ANDROID) |
| 614 | { |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 615 | "disable-webaudio", |
| 616 | IDS_FLAGS_DISABLE_WEBAUDIO_NAME, |
| 617 | IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION, |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 618 | kOsAndroid, |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 619 | SINGLE_VALUE_TYPE(switches::kDisableWebAudio) |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 620 | }, |
| 621 | #endif |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 622 | { |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 623 | "enable-compositing-for-transition", |
| 624 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME, |
| 625 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION, |
| 626 | kOsAll, |
| 627 | MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices) |
| 628 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 629 | // Native client is compiled out when DISABLE_NACL is defined. |
| 630 | #if !defined(DISABLE_NACL) |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 631 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 632 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 633 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 634 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 635 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 636 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 637 | }, |
| 638 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 639 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 640 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 641 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 642 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 643 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 644 | }, |
| 645 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 646 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 647 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 648 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 649 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 650 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 651 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 652 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 653 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 654 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 655 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 656 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 657 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 658 | kOsDesktop, |
[email protected] | c8d0299 | 2013-07-31 22:16:51 | [diff] [blame] | 659 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 660 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 661 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 662 | "extensions-on-chrome-urls", |
| 663 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 664 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 665 | kOsAll, |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 666 | SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 667 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 668 | #endif |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 669 | { |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 670 | "enable-fast-unload", |
| 671 | IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, |
| 672 | IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION, |
| 673 | kOsAll, |
| 674 | SINGLE_VALUE_TYPE(switches::kEnableFastUnload) |
| 675 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 676 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 677 | { |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 678 | "enable-app-window-controls", |
| 679 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, |
| 680 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION, |
| 681 | kOsDesktop, |
hashimoto | f784afd | 2014-09-05 02:38:31 | [diff] [blame] | 682 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls) |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 683 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 684 | #endif |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 685 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 686 | "disable-hyperlink-auditing", |
| 687 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 688 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 689 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 690 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 691 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 692 | #if defined(OS_ANDROID) |
| 693 | { |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 694 | "contextual-search", |
| 695 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH, |
| 696 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION, |
| 697 | kOsAndroid, |
[email protected] | 41d32bb | 2014-05-30 08:26:05 | [diff] [blame] | 698 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, |
| 699 | switches::kDisableContextualSearch) |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 700 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 701 | #endif |
[email protected] | 8cc9e53 | 2013-05-06 21:01:47 | [diff] [blame] | 702 | { |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 703 | "show-autofill-type-predictions", |
| 704 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 705 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 706 | kOsAll, |
[email protected] | e217c563 | 2013-04-12 19:11:48 | [diff] [blame] | 707 | SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions) |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 708 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 709 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 710 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 711 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 712 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 713 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 714 | // On by default for the Mac (different implementation in WebKit). |
[email protected] | a5a5aaf | 2013-12-19 02:10:10 | [diff] [blame] | 715 | kOsLinux, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 716 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 717 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 718 | #if defined(USE_AURA) || defined(OS_LINUX) |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 719 | { |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 720 | "overlay-scrollbars", |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 721 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME, |
| 722 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION, |
| 723 | // Uses the system preference on Mac (a different implementation). |
| 724 | // On Android, this is always enabled. |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 725 | kOsLinux | kOsCrOS | kOsWin, |
| 726 | MULTI_VALUE_TYPE(kOverlayScrollbarChoices) |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 727 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 728 | #endif |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 729 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 730 | "enable-panels", |
| 731 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 732 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 733 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 734 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 735 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 736 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 737 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 738 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 739 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 740 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 741 | kOsMac | kOsWin | kOsLinux, |
| 742 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 743 | }, |
| 744 | { |
[email protected] | 903e6338 | 2013-06-01 00:40:58 | [diff] [blame] | 745 | "enable-quic", |
| 746 | IDS_FLAGS_ENABLE_QUIC_NAME, |
| 747 | IDS_FLAGS_ENABLE_QUIC_DESCRIPTION, |
| 748 | kOsAll, |
| 749 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, |
| 750 | switches::kDisableQuic) |
| 751 | }, |
| 752 | { |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 753 | "enable-spdy4", |
| 754 | IDS_FLAGS_ENABLE_SPDY4_NAME, |
| 755 | IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION, |
[email protected] | bca09b998 | 2013-06-27 22:30:46 | [diff] [blame] | 756 | kOsAll, |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 757 | SINGLE_VALUE_TYPE(switches::kEnableSpdy4) |
[email protected] | 88a33262 | 2013-07-30 07:13:32 | [diff] [blame] | 758 | }, |
| 759 | { |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 760 | "enable-async-dns", |
| 761 | IDS_FLAGS_ENABLE_ASYNC_DNS_NAME, |
| 762 | IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION, |
[email protected] | 85594c14 | 2012-09-11 18:02:46 | [diff] [blame] | 763 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 764 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns, |
| 765 | switches::kDisableAsyncDns) |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 766 | }, |
| 767 | { |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 768 | "disable-media-source", |
| 769 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 770 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 771 | kOsAll, |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 772 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 722b4d484f | 2013-10-08 20:33:59 | [diff] [blame] | 773 | }, |
| 774 | { |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 775 | "enable-encrypted-media", |
| 776 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME, |
| 777 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 778 | kOsAll, |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 779 | SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia) |
| 780 | }, |
| 781 | { |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 782 | "disable-prefixed-encrypted-media", |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 783 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME, |
| 784 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 785 | kOsAll, |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 786 | SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 787 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 788 | #if defined(OS_ANDROID) |
| 789 | { |
[email protected] | 3c56ec1 | 2013-09-25 02:03:42 | [diff] [blame] | 790 | "disable-infobar-for-protected-media-identifier", |
| 791 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME, |
| 792 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION, |
| 793 | kOsAndroid, |
| 794 | SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier) |
| 795 | }, |
| 796 | { |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 797 | "mediadrm-enable-non-compositing", |
| 798 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME, |
| 799 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION, |
| 800 | kOsAndroid, |
| 801 | SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing) |
| 802 | }, |
| 803 | #endif // defined(OS_ANDROID) |
[email protected] | d21ead4 | 2013-06-24 06:35:06 | [diff] [blame] | 804 | { |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 805 | "enable-javascript-harmony", |
| 806 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 807 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 808 | kOsAll, |
erikcorry | b251cb9 | 2014-09-25 23:48:51 | [diff] [blame] | 809 | SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony) |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 810 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 811 | { |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 812 | "disable-software-rasterizer", |
| 813 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 814 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 815 | #if defined(ENABLE_SWIFTSHADER) |
| 816 | kOsAll, |
| 817 | #else |
| 818 | 0, |
| 819 | #endif |
| 820 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 821 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 822 | { |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 823 | "enable-gpu-rasterization", |
| 824 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 825 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
[email protected] | 96d25e2 | 2014-03-04 05:56:18 | [diff] [blame] | 826 | kOsAndroid, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 827 | MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 828 | }, |
| 829 | { |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 830 | "enable-experimental-web-platform-features", |
| 831 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 832 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 833 | kOsAll, |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 834 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 835 | }, |
| 836 | { |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 837 | "disable-ntp-other-sessions-menu", |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 838 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME, |
| 839 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 840 | kOsDesktop, |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 841 | SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu) |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 842 | }, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 843 | { |
[email protected] | 2b8290d | 2014-08-02 00:29:36 | [diff] [blame] | 844 | "enable-material-design-ntp", |
| 845 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME, |
| 846 | IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION, |
| 847 | kOsDesktop, |
| 848 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP, |
| 849 | switches::kDisableMaterialDesignNTP) |
| 850 | }, |
| 851 | { |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 852 | "enable-devtools-experiments", |
| 853 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 854 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 855 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 856 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 857 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 858 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 859 | "silent-debugger-extension-api", |
| 860 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 861 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 862 | kOsDesktop, |
| 863 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 864 | }, |
| 865 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 866 | "spellcheck-autocorrect", |
| 867 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 868 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 869 | kOsWin | kOsLinux | kOsCrOS, |
| 870 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 871 | }, |
| 872 | { |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 873 | "enable-scroll-prediction", |
| 874 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME, |
| 875 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION, |
| 876 | kOsDesktop, |
| 877 | SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction) |
| 878 | }, |
| 879 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 880 | "touch-events", |
| 881 | IDS_TOUCH_EVENTS_NAME, |
| 882 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 883 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 884 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 885 | }, |
| 886 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 887 | "disable-touch-adjustment", |
| 888 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 889 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
zeeshanq | cf855b0 | 2014-09-25 18:09:49 | [diff] [blame] | 890 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 891 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 892 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 893 | #if defined(OS_CHROMEOS) |
| 894 | { |
[email protected] | 81f89e9 | 2014-02-21 14:27:35 | [diff] [blame] | 895 | "network-portal-notification", |
| 896 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME, |
| 897 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION, |
| 898 | kOsCrOS, |
| 899 | ENABLE_DISABLE_VALUE_TYPE( |
| 900 | chromeos::switches::kEnableNetworkPortalNotification, |
| 901 | chromeos::switches::kDisableNetworkPortalNotification) |
| 902 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 903 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 904 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 905 | "enable-download-resumption", |
| 906 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 907 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 908 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 909 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 910 | }, |
[email protected] | 67fe364 | 2014-08-05 00:00:42 | [diff] [blame] | 911 | #if defined(ENABLE_PLUGINS) |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 912 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 913 | "allow-nacl-socket-api", |
| 914 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 915 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 916 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 917 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 918 | }, |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 919 | #endif |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 920 | #if defined(OS_CHROMEOS) |
| 921 | { |
| 922 | "allow-touchpad-three-finger-click", |
| 923 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 924 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 925 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 926 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick) |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 927 | }, |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 928 | { |
xiyuan | 1958f5a | 2014-10-01 04:23:30 | [diff] [blame] | 929 | "disable-easy-signin", |
| 930 | IDS_FLAGS_DISABLE_EASY_SIGNIN_NAME, |
| 931 | IDS_FLAGS_DISABLE_EASY_SIGNIN_DESCRIPTION, |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 932 | kOsCrOSOwnerOnly, |
xiyuan | 1958f5a | 2014-10-01 04:23:30 | [diff] [blame] | 933 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableEasySignin), |
xiyuan | a0e92b08 | 2014-09-15 22:24:08 | [diff] [blame] | 934 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 935 | #endif |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 936 | #if defined(USE_ASH) |
| 937 | { |
[email protected] | 2ddf37b | 2013-04-20 01:15:58 | [diff] [blame] | 938 | "disable-minimize-on-second-launcher-item-click", |
| 939 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME, |
| 940 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION, |
| 941 | kOsAll, |
| 942 | SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick) |
| 943 | }, |
| 944 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 945 | "show-touch-hud", |
| 946 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 947 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 948 | kOsAll, |
| 949 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 950 | }, |
| 951 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 952 | "enable-pinch", |
| 953 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 954 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 955 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 956 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 957 | }, |
[email protected] | adcdcdd0 | 2014-04-25 03:30:24 | [diff] [blame] | 958 | #endif // defined(USE_ASH) |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 959 | { |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 960 | "enable-pinch-virtual-viewport", |
| 961 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME, |
| 962 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION, |
[email protected] | fe89d82 | 2014-04-28 10:29:00 | [diff] [blame] | 963 | kOsLinux | kOsWin | kOsCrOS | kOsAndroid, |
| 964 | ENABLE_DISABLE_VALUE_TYPE( |
| 965 | cc::switches::kEnablePinchVirtualViewport, |
| 966 | cc::switches::kDisablePinchVirtualViewport), |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 967 | }, |
[email protected] | 68bc37c | 2014-01-07 15:56:48 | [diff] [blame] | 968 | { |
| 969 | "enable-viewport-meta", |
| 970 | IDS_FLAGS_ENABLE_VIEWPORT_META_NAME, |
| 971 | IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION, |
| 972 | kOsLinux | kOsWin | kOsCrOS | kOsMac, |
| 973 | SINGLE_VALUE_TYPE(switches::kEnableViewportMeta), |
| 974 | }, |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 975 | #if defined(OS_CHROMEOS) |
| 976 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 977 | "disable-boot-animation", |
| 978 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 979 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 980 | kOsCrOSOwnerOnly, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 981 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation), |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 982 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 983 | { |
[email protected] | d739c1db | 2014-07-08 07:19:59 | [diff] [blame] | 984 | "enable-video-player-chromecast-support", |
| 985 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME, |
| 986 | IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION, |
| 987 | kOsCrOS, |
| 988 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport) |
| 989 | }, |
| 990 | { |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 991 | "disable-office-editing-component-app", |
| 992 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME, |
| 993 | IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION, |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 994 | kOsCrOS, |
[email protected] | f2ad22e | 2014-07-10 17:52:08 | [diff] [blame] | 995 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp), |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 996 | }, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 997 | { |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 998 | "disable-display-color-calibration", |
| 999 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, |
| 1000 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, |
| 1001 | kOsCrOS, |
| 1002 | SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), |
| 1003 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1004 | #endif // defined(OS_CHROMEOS) |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1005 | { "disable-accelerated-video-decode", |
| 1006 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1007 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
[email protected] | 33e98a85 | 2013-04-26 05:14:19 | [diff] [blame] | 1008 | kOsWin | kOsCrOS, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1009 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1010 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1011 | #if defined(USE_ASH) |
[email protected] | 35c9a4e | 2013-09-14 01:32:38 | [diff] [blame] | 1012 | { |
| 1013 | "ash-debug-shortcuts", |
| 1014 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1015 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1016 | kOsAll, |
| 1017 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1018 | }, |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 1019 | { "ash-enable-touch-view-testing", |
| 1020 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME, |
| 1021 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION, |
| 1022 | kOsCrOS, |
| 1023 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting), |
| 1024 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1025 | { |
jonross | 37f21b8 | 2014-09-29 20:31:35 | [diff] [blame] | 1026 | "enable-touch-feedback", |
| 1027 | IDS_FLAGS_ENABLE_TOUCH_FEEDBACK_NAME, |
| 1028 | IDS_FLAGS_ENABLE_TOUCH_FEEDBACK_DESCRIPTION, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1029 | kOsCrOS, |
jonross | 37f21b8 | 2014-09-29 20:31:35 | [diff] [blame] | 1030 | SINGLE_VALUE_TYPE(switches::kEnableTouchFeedback), |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1031 | }, |
[email protected] | 8847487 | 2014-07-04 22:51:06 | [diff] [blame] | 1032 | { "ash-disable-text-filtering-in-overview-mode", |
| 1033 | IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME, |
| 1034 | IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION, |
| 1035 | kOsCrOS, |
| 1036 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode), |
| 1037 | }, |
jonross | 367a1bee | 2014-09-06 12:37:08 | [diff] [blame] | 1038 | #endif // defined(USE_ASH) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1039 | #if defined(OS_CHROMEOS) |
| 1040 | { |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1041 | "enable-carrier-switching", |
| 1042 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING, |
| 1043 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION, |
| 1044 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1045 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching) |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1046 | }, |
| 1047 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1048 | "enable-request-tablet-site", |
| 1049 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1050 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1051 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1052 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1053 | }, |
| 1054 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1055 | { |
| 1056 | "debug-packed-apps", |
| 1057 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1058 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1059 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1060 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1061 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1062 | { |
| 1063 | "enable-password-generation", |
| 1064 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1065 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
[email protected] | d4855d3 | 2014-08-22 18:34:53 | [diff] [blame] | 1066 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | c3cc063 | 2013-10-03 21:54:43 | [diff] [blame] | 1067 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration, |
| 1068 | autofill::switches::kDisablePasswordGeneration) |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1069 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1070 | { |
[email protected] | 0477c06 | 2014-04-30 15:02:18 | [diff] [blame] | 1071 | "enable-automatic-password-saving", |
| 1072 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME, |
| 1073 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION, |
| 1074 | kOsDesktop, |
| 1075 | SINGLE_VALUE_TYPE( |
| 1076 | password_manager::switches::kEnableAutomaticPasswordSaving) |
| 1077 | }, |
| 1078 | { |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1079 | "password-manager-reauthentication", |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1080 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME, |
| 1081 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION, |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 1082 | kOsMac | kOsWin, |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1083 | SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1084 | }, |
| 1085 | { |
[email protected] | 0f1f7085 | 2014-08-09 05:56:01 | [diff] [blame] | 1086 | "enable-android-password-link", |
| 1087 | IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_NAME, |
| 1088 | IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_DESCRIPTION, |
| 1089 | kOsAndroid, |
| 1090 | ENABLE_DISABLE_VALUE_TYPE( |
| 1091 | password_manager::switches::kEnableAndroidPasswordLink, |
| 1092 | password_manager::switches::kDisableAndroidPasswordLink) |
| 1093 | }, |
| 1094 | { |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1095 | "enable-deferred-image-decoding", |
| 1096 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME, |
| 1097 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1098 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1099 | SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding) |
| 1100 | }, |
| 1101 | { |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1102 | "wallet-service-use-sandbox", |
| 1103 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
| 1104 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, |
[email protected] | d4d5999 | 2014-06-04 23:48:07 | [diff] [blame] | 1105 | kOsAndroid | kOsDesktop, |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1106 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1107 | autofill::switches::kWalletServiceUseSandbox, "1", |
| 1108 | autofill::switches::kWalletServiceUseSandbox, "0") |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1109 | }, |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1110 | #if defined(USE_AURA) |
| 1111 | { |
| 1112 | "overscroll-history-navigation", |
| 1113 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
| 1114 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, |
| 1115 | kOsAll, |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 1116 | MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices) |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1117 | }, |
| 1118 | #endif |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1119 | { |
[email protected] | 888878e8 | 2013-07-24 22:49:40 | [diff] [blame] | 1120 | "scroll-end-effect", |
| 1121 | IDS_FLAGS_SCROLL_END_EFFECT_NAME, |
| 1122 | IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION, |
| 1123 | kOsCrOS, |
| 1124 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1125 | switches::kScrollEndEffect, "1", |
| 1126 | switches::kScrollEndEffect, "0") |
| 1127 | }, |
| 1128 | { |
[email protected] | cc7c069d | 2014-08-07 20:42:05 | [diff] [blame] | 1129 | "enable-renderer-mojo-channel", |
| 1130 | IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME, |
| 1131 | IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION, |
| 1132 | kOsAll, |
| 1133 | SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel) |
| 1134 | }, |
| 1135 | { |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1136 | "enable-touch-drag-drop", |
| 1137 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1138 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1139 | kOsWin | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1140 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop, |
| 1141 | switches::kDisableTouchDragDrop) |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1142 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1143 | { |
| 1144 | "enable-touch-editing", |
| 1145 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1146 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
[email protected] | 877dd94 | 2014-06-06 16:02:01 | [diff] [blame] | 1147 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1148 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing, |
| 1149 | switches::kDisableTouchEditing) |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1150 | }, |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1151 | { |
[email protected] | 06a82ff | 2014-04-25 02:24:46 | [diff] [blame] | 1152 | "enable-suggestions-service", |
| 1153 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME, |
| 1154 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION, |
| 1155 | kOsAndroid | kOsCrOS, |
| 1156 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, |
| 1157 | switches::kDisableSuggestionsService) |
| 1158 | }, |
| 1159 | { |
treib | fd04f15 | 2014-09-08 16:31:06 | [diff] [blame] | 1160 | "enable-supervised-user-blacklist", |
| 1161 | IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME, |
| 1162 | IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION, |
| 1163 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
| 1164 | SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist) |
| 1165 | }, |
| 1166 | { |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1167 | "enable-sync-synced-notifications", |
| 1168 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME, |
| 1169 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4316893 | 2013-05-24 06:35:18 | [diff] [blame] | 1170 | kOsDesktop, |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1171 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications, |
| 1172 | switches::kDisableSyncSyncedNotifications) |
| 1173 | }, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1174 | #if defined(ENABLE_APP_LIST) |
| 1175 | { |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1176 | "enable-sync-app-list", |
| 1177 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME, |
| 1178 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1179 | kOsDesktop, |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1180 | MULTI_VALUE_TYPE(kEnableSyncAppListChoices) |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1181 | }, |
| 1182 | #endif |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1183 | #if defined(OS_MACOSX) |
| 1184 | { |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1185 | "enable-avfoundation", |
| 1186 | IDS_FLAGS_ENABLE_AVFOUNDATION_NAME, |
| 1187 | IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1188 | kOsMac, |
[email protected] | 469ea5c | 2014-08-12 20:00:56 | [diff] [blame] | 1189 | MULTI_VALUE_TYPE(kEnableAVFoundationChoices) |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1190 | }, |
| 1191 | #endif |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1192 | { |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1193 | "impl-side-painting", |
| 1194 | IDS_FLAGS_IMPL_SIDE_PAINTING_NAME, |
| 1195 | IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1196 | kOsAll, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1197 | MULTI_VALUE_TYPE(kImplSidePaintingChoices) |
| 1198 | }, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1199 | { |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1200 | "lcd-text-aa", |
| 1201 | IDS_FLAGS_LCD_TEXT_NAME, |
| 1202 | IDS_FLAGS_LCD_TEXT_DESCRIPTION, |
| 1203 | kOsDesktop, |
| 1204 | MULTI_VALUE_TYPE(kLCDTextChoices) |
| 1205 | }, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1206 | #if defined(OS_ANDROID) || defined(OS_MACOSX) |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1207 | { |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1208 | "delegated-renderer", |
| 1209 | IDS_FLAGS_DELEGATED_RENDERER_NAME, |
| 1210 | IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION, |
[email protected] | 4ac579b | 2014-05-20 06:43:23 | [diff] [blame] | 1211 | kOsAndroid, // TODO(ccameron) Add mac support soon. |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1212 | MULTI_VALUE_TYPE(kDelegatedRendererChoices) |
| 1213 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1214 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1215 | { |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1216 | "max-tiles-for-interest-area", |
| 1217 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME, |
| 1218 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1219 | kOsAll, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1220 | MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices) |
| 1221 | }, |
[email protected] | 7cf7ccb | 2013-04-20 02:53:08 | [diff] [blame] | 1222 | { |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1223 | "enable-offline-auto-reload", |
| 1224 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME, |
| 1225 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION, |
| 1226 | kOsAll, |
[email protected] | bd519e3 | 2014-05-09 01:33:17 | [diff] [blame] | 1227 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload, |
| 1228 | switches::kDisableOfflineAutoReload) |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1229 | }, |
| 1230 | { |
[email protected] | d2e1a0a | 2014-06-16 15:49:37 | [diff] [blame] | 1231 | "enable-offline-auto-reload-visible-only", |
| 1232 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME, |
| 1233 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION, |
| 1234 | kOsAll, |
| 1235 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly, |
| 1236 | switches::kDisableOfflineAutoReloadVisibleOnly) |
| 1237 | }, |
| 1238 | { |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1239 | "enable-offline-load-stale-cache", |
| 1240 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME, |
| 1241 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION, |
| 1242 | kOsLinux | kOsMac | kOsWin | kOsAndroid, |
[email protected] | e83140a0 | 2014-05-07 14:04:58 | [diff] [blame] | 1243 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache, |
| 1244 | switches::kDisableOfflineLoadStaleCache) |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1245 | }, |
| 1246 | { |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1247 | "default-tile-width", |
| 1248 | IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME, |
| 1249 | IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION, |
| 1250 | kOsAll, |
| 1251 | MULTI_VALUE_TYPE(kDefaultTileWidthChoices) |
| 1252 | }, |
| 1253 | { |
| 1254 | "default-tile-height", |
| 1255 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME, |
| 1256 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION, |
| 1257 | kOsAll, |
| 1258 | MULTI_VALUE_TYPE(kDefaultTileHeightChoices) |
| 1259 | }, |
[email protected] | 2289b43 | 2014-08-08 17:52:11 | [diff] [blame] | 1260 | #if defined(OS_ANDROID) |
| 1261 | { |
| 1262 | "disable-gesture-requirement-for-media-playback", |
| 1263 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1264 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1265 | kOsAndroid, |
| 1266 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1267 | }, |
| 1268 | #endif |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1269 | #if defined(OS_CHROMEOS) |
| 1270 | { |
| 1271 | "enable-virtual-keyboard", |
| 1272 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1273 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1274 | kOsCrOS, |
| 1275 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1276 | }, |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1277 | { |
[email protected] | bb6378fe | 2014-04-28 21:19:44 | [diff] [blame] | 1278 | "enable-virtual-keyboard-overscroll", |
| 1279 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME, |
| 1280 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION, |
| 1281 | kOsCrOS, |
| 1282 | ENABLE_DISABLE_VALUE_TYPE( |
| 1283 | keyboard::switches::kEnableVirtualKeyboardOverscroll, |
| 1284 | keyboard::switches::kDisableVirtualKeyboardOverscroll) |
| 1285 | }, |
| 1286 | { |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1287 | "enable-swipe-selection", |
| 1288 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME, |
| 1289 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION, |
| 1290 | kOsCrOS, |
| 1291 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection) |
| 1292 | }, |
[email protected] | 0e627fb1 | 2014-03-25 18:18:53 | [diff] [blame] | 1293 | { |
| 1294 | "enable-input-view", |
| 1295 | IDS_FLAGS_ENABLE_INPUT_VIEW_NAME, |
| 1296 | IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION, |
| 1297 | kOsCrOS, |
| 1298 | ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView, |
| 1299 | keyboard::switches::kDisableInputView) |
| 1300 | }, |
[email protected] | 9093341 | 2014-06-05 21:11:02 | [diff] [blame] | 1301 | { |
| 1302 | "enable-experimental-input-view-features", |
| 1303 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME, |
| 1304 | IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION, |
| 1305 | kOsCrOS, |
| 1306 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures) |
| 1307 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1308 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1309 | { |
| 1310 | "enable-simple-cache-backend", |
| 1311 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1312 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
[email protected] | 957cd5a | 2014-03-27 19:54:17 | [diff] [blame] | 1313 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1314 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1315 | }, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1316 | { |
| 1317 | "enable-tcp-fast-open", |
| 1318 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME, |
| 1319 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION, |
[email protected] | d0a8a16 | 2013-04-13 01:37:11 | [diff] [blame] | 1320 | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1321 | SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen) |
| 1322 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1323 | #if defined(ENABLE_SERVICE_DISCOVERY) |
[email protected] | a4ed7e1 | 2013-05-24 01:00:28 | [diff] [blame] | 1324 | { |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1325 | "device-discovery-notifications", |
| 1326 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME, |
| 1327 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1328 | kOsDesktop, |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1329 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications, |
| 1330 | switches::kDisableDeviceDiscoveryNotifications) |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1331 | }, |
[email protected] | 53ffe0d | 2013-10-30 01:20:40 | [diff] [blame] | 1332 | { |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1333 | "enable-cloud-devices", |
| 1334 | IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME, |
| 1335 | IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION, |
| 1336 | kOsDesktop, |
| 1337 | SINGLE_VALUE_TYPE(switches::kEnableCloudDevices) |
| 1338 | }, |
| 1339 | { |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1340 | "enable-print-preview-register-promos", |
| 1341 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME, |
| 1342 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION, |
[email protected] | 4e6c96e | 2014-05-17 18:41:19 | [diff] [blame] | 1343 | kOsDesktop, |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1344 | SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos) |
| 1345 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1346 | #endif // ENABLE_SERVICE_DISCOVERY |
[email protected] | ca53b14 | 2014-02-25 22:42:23 | [diff] [blame] | 1347 | #if defined(OS_WIN) |
| 1348 | { |
| 1349 | "enable-cloud-print-xps", |
| 1350 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME, |
| 1351 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION, |
| 1352 | kOsWin, |
| 1353 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps) |
| 1354 | }, |
| 1355 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 1356 | #if defined(USE_AURA) |
| 1357 | { |
| 1358 | "tab-capture-upscale-quality", |
| 1359 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1360 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1361 | kOsAll, |
| 1362 | MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1363 | }, |
| 1364 | { |
| 1365 | "tab-capture-downscale-quality", |
| 1366 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1367 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1368 | kOsAll, |
| 1369 | MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1370 | }, |
| 1371 | #endif |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1372 | { |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1373 | "enable-spelling-feedback-field-trial", |
| 1374 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME, |
| 1375 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION, |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1376 | kOsAll, |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1377 | SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial) |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1378 | }, |
| 1379 | { |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1380 | "enable-webgl-draft-extensions", |
| 1381 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME, |
| 1382 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION, |
| 1383 | kOsAll, |
| 1384 | SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions) |
| 1385 | }, |
[email protected] | deadc49 | 2013-06-07 21:39:28 | [diff] [blame] | 1386 | { |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1387 | "enable-web-midi", |
| 1388 | IDS_FLAGS_ENABLE_WEB_MIDI_NAME, |
| 1389 | IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION, |
[email protected] | 28e56e9 | 2014-01-03 07:52:39 | [diff] [blame] | 1390 | kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1391 | SINGLE_VALUE_TYPE(switches::kEnableWebMIDI) |
| 1392 | }, |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1393 | { |
| 1394 | "enable-new-profile-management", |
| 1395 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME, |
| 1396 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION, |
[email protected] | a3b75bd | 2014-05-28 17:49:42 | [diff] [blame] | 1397 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1398 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement, |
| 1399 | switches::kDisableNewProfileManagement) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1400 | }, |
| 1401 | { |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1402 | "enable-account-consistency", |
| 1403 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME, |
| 1404 | IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION, |
| 1405 | kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 29896ee | 2014-06-17 17:20:53 | [diff] [blame] | 1406 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency, |
| 1407 | switches::kDisableAccountConsistency) |
[email protected] | 1017a321 | 2014-05-30 10:34:59 | [diff] [blame] | 1408 | }, |
| 1409 | { |
[email protected] | 8f56988 | 2014-03-25 21:12:12 | [diff] [blame] | 1410 | "enable-fast-user-switching", |
| 1411 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME, |
| 1412 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION, |
| 1413 | kOsMac | kOsWin | kOsLinux, |
| 1414 | SINGLE_VALUE_TYPE(switches::kFastUserSwitching) |
| 1415 | }, |
| 1416 | { |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1417 | "enable-new-avatar-menu", |
| 1418 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME, |
| 1419 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION, |
| 1420 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 9152a54 | 2014-08-06 05:37:45 | [diff] [blame] | 1421 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu, |
| 1422 | switches::kDisableNewAvatarMenu) |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1423 | }, |
| 1424 | { |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1425 | "enable-web-based-signin", |
| 1426 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME, |
| 1427 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION, |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1428 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1429 | SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin) |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1430 | }, |
| 1431 | { |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1432 | "enable-google-profile-info", |
| 1433 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME, |
| 1434 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION, |
[email protected] | a9bf7d6 | 2013-07-11 22:11:22 | [diff] [blame] | 1435 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1436 | SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1437 | }, |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1438 | { |
[email protected] | 056ed709 | 2014-01-09 12:57:21 | [diff] [blame] | 1439 | "reset-app-list-install-state", |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1440 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME, |
| 1441 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION, |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1442 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1443 | SINGLE_VALUE_TYPE(switches::kResetAppListInstallState) |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1444 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1445 | #if defined(ENABLE_APP_LIST) |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1446 | #if defined(OS_LINUX) |
| 1447 | { |
| 1448 | // This is compiled out on non-Linux platforms because otherwise it would be |
| 1449 | // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing. |
| 1450 | // TODO(mgiuca): Remove the #if when Aura is the default on Linux. |
| 1451 | "enable-app-list", |
| 1452 | IDS_FLAGS_ENABLE_APP_LIST_NAME, |
| 1453 | IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION, |
| 1454 | kOsLinux, |
| 1455 | SINGLE_VALUE_TYPE(switches::kEnableAppList) |
| 1456 | }, |
| 1457 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1458 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 1459 | { |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1460 | "enable-app-view", |
| 1461 | IDS_FLAGS_ENABLE_APP_VIEW_NAME, |
| 1462 | IDS_FLAGS_ENABLE_APP_VIEW_DESCRIPTION, |
fsamuel | bb30da9 | 2014-08-27 21:20:29 | [diff] [blame] | 1463 | kOsDesktop, |
[email protected] | b4ef121 | 2014-08-21 18:31:26 | [diff] [blame] | 1464 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppView) |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1465 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1466 | #endif |
[email protected] | 97df3be | 2014-07-03 07:49:10 | [diff] [blame] | 1467 | { |
[email protected] | 9e0a44c | 2014-06-07 14:26:21 | [diff] [blame] | 1468 | "disable-app-list-app-info", |
| 1469 | IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST, |
| 1470 | IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION, |
| 1471 | kOsLinux | kOsWin | kOsCrOS, |
| 1472 | SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo) |
| 1473 | }, |
| 1474 | { |
xiyuan | fde6f25 | 2014-09-12 17:23:48 | [diff] [blame] | 1475 | "disable-drive-apps-in-app-list", |
| 1476 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME, |
| 1477 | IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION, |
| 1478 | kOsCrOS, |
| 1479 | SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList) |
[email protected] | c30bda26 | 2014-06-19 04:10:13 | [diff] [blame] | 1480 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1481 | #endif |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1482 | #if defined(OS_ANDROID) |
| 1483 | { |
| 1484 | "enable-accessibility-tab-switcher", |
| 1485 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME, |
| 1486 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION, |
| 1487 | kOsAndroid, |
| 1488 | SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher) |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1489 | }, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1490 | { |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1491 | // TODO(dmazzoni): remove this flag when native android accessibility |
| 1492 | // ships in the stable channel. http://crbug.com/356775 |
| 1493 | "enable-accessibility-script-injection", |
| 1494 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME, |
| 1495 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1496 | kOsAndroid, |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1497 | // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION. |
| 1498 | SINGLE_VALUE_TYPE("enable-accessibility-script-injection") |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1499 | }, |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1500 | #endif |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1501 | { |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1502 | "enable-one-copy", |
| 1503 | IDS_FLAGS_ONE_COPY_NAME, |
| 1504 | IDS_FLAGS_ONE_COPY_DESCRIPTION, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 1505 | kOsAll, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1506 | SINGLE_VALUE_TYPE(switches::kEnableOneCopy) |
| 1507 | }, |
| 1508 | { |
| 1509 | "enable-zero-copy", |
| 1510 | IDS_FLAGS_ZERO_COPY_NAME, |
| 1511 | IDS_FLAGS_ZERO_COPY_DESCRIPTION, |
| 1512 | kOsAll, |
| 1513 | MULTI_VALUE_TYPE(kZeroCopyChoices) |
[email protected] | 4fdc518f | 2013-08-28 21:37:27 | [diff] [blame] | 1514 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1515 | #if defined(OS_CHROMEOS) |
| 1516 | { |
[email protected] | 407d82b | 2013-12-13 11:50:59 | [diff] [blame] | 1517 | "enable-first-run-ui-transitions", |
| 1518 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME, |
| 1519 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION, |
| 1520 | kOsCrOS, |
| 1521 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions) |
| 1522 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1523 | #endif |
[email protected] | ed1aab1 | 2013-10-08 14:27:07 | [diff] [blame] | 1524 | { |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1525 | "enable-streamlined-hosted-apps", |
| 1526 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME, |
| 1527 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION, |
[email protected] | abe7f872 | 2013-12-13 11:38:06 | [diff] [blame] | 1528 | kOsWin | kOsCrOS | kOsLinux, |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1529 | SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps) |
| 1530 | }, |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1531 | { |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1532 | "enable-ephemeral-apps", |
| 1533 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME, |
| 1534 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1535 | kOsAll, |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1536 | SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps) |
| 1537 | }, |
| 1538 | { |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1539 | "enable-linkable-ephemeral-apps", |
| 1540 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME, |
| 1541 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | c04b333 | 2014-05-30 10:43:20 | [diff] [blame] | 1542 | kOsAll, |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1543 | SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps) |
| 1544 | }, |
| 1545 | { |
[email protected] | 7d8056d | 2014-04-14 15:55:21 | [diff] [blame] | 1546 | "enable-service-worker-sync", |
| 1547 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME, |
| 1548 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION, |
| 1549 | kOsAll, |
| 1550 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync) |
| 1551 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1552 | #if defined(OS_ANDROID) |
| 1553 | { |
| 1554 | "disable-click-delay", |
| 1555 | IDS_FLAGS_DISABLE_CLICK_DELAY_NAME, |
| 1556 | IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION, |
| 1557 | kOsAndroid, |
| 1558 | // Java-only switch: CommandLine.DISABLE_CLICK_DELAY |
| 1559 | SINGLE_VALUE_TYPE("disable-click-delay") |
| 1560 | }, |
| 1561 | #endif |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1562 | #if defined(OS_MACOSX) |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1563 | { |
| 1564 | "enable-translate-new-ux", |
| 1565 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME, |
| 1566 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1567 | kOsMac, |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1568 | SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX) |
| 1569 | }, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1570 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1571 | #if defined(TOOLKIT_VIEWS) |
| 1572 | { |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1573 | "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA |
| 1574 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME, |
| 1575 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION, |
[email protected] | 42f5fe54 | 2014-07-25 17:59:33 | [diff] [blame] | 1576 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1577 | SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1578 | }, |
| 1579 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1580 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1581 | { |
| 1582 | "enable-apps-show-on-first-paint", |
| 1583 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, |
| 1584 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION, |
| 1585 | kOsDesktop, |
[email protected] | 6fa20245 | 2014-08-19 05:34:07 | [diff] [blame] | 1586 | SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint) |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1587 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1588 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1589 | { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1590 | "enhanced-bookmarks-experiment", |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1591 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1592 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1593 | kOsDesktop | kOsAndroid, |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1594 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1595 | switches::kEnhancedBookmarksExperiment, "1", |
| 1596 | switches::kEnhancedBookmarksExperiment, "0") |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1597 | }, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1598 | { |
| 1599 | "manual-enhanced-bookmarks", |
| 1600 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1601 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1602 | kOsDesktop | kOsAndroid, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1603 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks) |
| 1604 | }, |
| 1605 | { |
| 1606 | "manual-enhanced-bookmarks-optout", |
| 1607 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1608 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
kkimlabs | eedd8b8 | 2014-09-05 13:01:09 | [diff] [blame] | 1609 | kOsDesktop | kOsAndroid, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1610 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout) |
| 1611 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1612 | #if defined(OS_ANDROID) |
| 1613 | { |
| 1614 | "enable-zero-suggest-experiment", |
| 1615 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME, |
| 1616 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION, |
| 1617 | kOsAndroid, |
| 1618 | MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices) |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1619 | }, |
Yaron Friedman | 7f37900b | 2014-08-26 16:37:26 | [diff] [blame] | 1620 | { |
| 1621 | "enable-reader-mode-toolbar-icon", |
| 1622 | IDS_FLAGS_READER_MODE_EXPERIMENT_NAME, |
| 1623 | IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION, |
| 1624 | kOsAndroid, |
| 1625 | SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon) |
| 1626 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1627 | #endif |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1628 | { |
| 1629 | "num-raster-threads", |
| 1630 | IDS_FLAGS_NUM_RASTER_THREADS_NAME, |
| 1631 | IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, |
| 1632 | kOsAll, |
| 1633 | MULTI_VALUE_TYPE(kNumRasterThreadsChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1634 | }, |
| 1635 | { |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 1636 | "origin-chip-in-omnibox", |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1637 | IDS_FLAGS_ORIGIN_CHIP_NAME, |
| 1638 | IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION, |
[email protected] | 393a646 | 2014-04-28 15:28:27 | [diff] [blame] | 1639 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 5d58f95 | 2014-05-20 21:12:47 | [diff] [blame] | 1640 | MULTI_VALUE_TYPE(kOriginChipChoices) |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 1641 | }, |
| 1642 | { |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1643 | "search-button-in-omnibox", |
| 1644 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME, |
| 1645 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION, |
[email protected] | 266cd0a | 2014-05-07 19:55:05 | [diff] [blame] | 1646 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1647 | MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices) |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1648 | }, |
| 1649 | { |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1650 | "disable-ignore-autocomplete-off", |
| 1651 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME, |
| 1652 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION, |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1653 | kOsAll, |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1654 | SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff) |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1655 | }, |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1656 | { |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1657 | "enable-permissions-bubbles", |
| 1658 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME, |
| 1659 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION, |
[email protected] | 4e6d54a | 2014-06-27 14:32:12 | [diff] [blame] | 1660 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 7d19822 | 2014-06-17 08:24:22 | [diff] [blame] | 1661 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles, |
| 1662 | switches::kDisablePermissionsBubbles) |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1663 | }, |
[email protected] | 4d11b08b | 2014-01-27 22:19:07 | [diff] [blame] | 1664 | { |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1665 | "enable-session-crashed-bubble", |
| 1666 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME, |
| 1667 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION, |
| 1668 | kOsWin | kOsLinux, |
[email protected] | 3d990b7 | 2014-05-27 21:16:13 | [diff] [blame] | 1669 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble, |
| 1670 | switches::kDisableSessionCrashedBubble) |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1671 | }, |
| 1672 | { |
[email protected] | 1231adf | 2014-01-31 02:22:33 | [diff] [blame] | 1673 | "out-of-process-pdf", |
| 1674 | IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME, |
| 1675 | IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION, |
| 1676 | kOsDesktop, |
| 1677 | SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf) |
| 1678 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1679 | #if defined(OS_ANDROID) |
| 1680 | { |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1681 | "disable-cast", |
| 1682 | IDS_FLAGS_DISABLE_CAST_NAME, |
| 1683 | IDS_FLAGS_DISABLE_CAST_DESCRIPTION, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1684 | kOsAndroid, |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1685 | SINGLE_VALUE_TYPE(switches::kDisableCast) |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1686 | }, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1687 | { |
| 1688 | "prefetch-search-results", |
| 1689 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME, |
| 1690 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1691 | kOsAndroid, |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1692 | SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults) |
| 1693 | }, |
[email protected] | 8ca7e09c | 2014-06-17 18:42:03 | [diff] [blame] | 1694 | #endif |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1695 | #if defined(ENABLE_APP_LIST) |
| 1696 | { |
| 1697 | "enable-experimental-app-list", |
| 1698 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, |
| 1699 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, |
| 1700 | kOsWin | kOsLinux | kOsCrOS, |
| 1701 | SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList) |
| 1702 | }, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1703 | { |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1704 | "enable-centered-app-list", |
| 1705 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME, |
| 1706 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1707 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1708 | SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList) |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1709 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1710 | #endif |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 1711 | { |
| 1712 | "touch-scrolling-mode", |
| 1713 | IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME, |
| 1714 | IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION, |
| 1715 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
| 1716 | MULTI_VALUE_TYPE(kTouchScrollingModeChoices) |
| 1717 | }, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1718 | { |
jdduke | 2eee6cb | 2014-09-25 17:02:21 | [diff] [blame] | 1719 | "disable-threaded-scrolling", |
| 1720 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME, |
| 1721 | IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION, |
| 1722 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
| 1723 | SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling) |
| 1724 | }, |
| 1725 | { |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1726 | "bleeding-edge-renderer-mode", |
| 1727 | IDS_FLAGS_BLEEDING_RENDERER_NAME, |
| 1728 | IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION, |
[email protected] | a8a9751 | 2014-03-24 18:28:20 | [diff] [blame] | 1729 | kOsAndroid, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1730 | SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths) |
| 1731 | }, |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1732 | { |
| 1733 | "enable-settings-window", |
| 1734 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME, |
| 1735 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION, |
| 1736 | kOsDesktop, |
[email protected] | aae7957 | 2014-06-13 00:42:58 | [diff] [blame] | 1737 | MULTI_VALUE_TYPE(kEnableSettingsWindowChoices) |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1738 | }, |
[email protected] | 812b82a | 2014-05-15 19:01:38 | [diff] [blame] | 1739 | #if defined(OS_ANDROID) |
| 1740 | { |
| 1741 | "enable-instant-search-clicks", |
| 1742 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME, |
| 1743 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION, |
| 1744 | kOsAndroid, |
| 1745 | SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks) |
| 1746 | }, |
| 1747 | #endif |
[email protected] | 4dffb66 | 2014-03-31 11:31:22 | [diff] [blame] | 1748 | { |
| 1749 | "enable-save-password-bubble", |
| 1750 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME, |
| 1751 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION, |
dconnelly | 35f985b3 | 2014-08-29 10:40:55 | [diff] [blame] | 1752 | kOsWin | kOsLinux | kOsCrOS | kOsMac, |
[email protected] | ea61c08 | 2014-04-07 16:57:24 | [diff] [blame] | 1753 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble, |
| 1754 | switches::kDisableSavePasswordBubble) |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1755 | }, |
[email protected] | 7fe71f0 | 2014-04-26 00:47:56 | [diff] [blame] | 1756 | // TODO(tyoshino): Remove this temporary flag and command line switch. See |
| 1757 | // crbug.com/366483 for the target milestone. |
| 1758 | { |
| 1759 | "allow-insecure-websocket-from-https-origin", |
| 1760 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME, |
| 1761 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION, |
| 1762 | kOsAll, |
| 1763 | SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin) |
| 1764 | }, |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1765 | { |
| 1766 | "enable-apps-file-associations", |
| 1767 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME, |
| 1768 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION, |
| 1769 | kOsMac, |
| 1770 | SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations) |
| 1771 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1772 | #if defined(OS_ANDROID) |
| 1773 | { |
| 1774 | "enable-embeddedsearch-api", |
| 1775 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME, |
| 1776 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION, |
| 1777 | kOsAndroid, |
| 1778 | SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) |
| 1779 | }, |
[email protected] | 1d134929 | 2014-05-02 05:22:33 | [diff] [blame] | 1780 | { |
| 1781 | "enable-app-install-alerts", |
| 1782 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME, |
| 1783 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION, |
| 1784 | kOsAndroid, |
| 1785 | SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts) |
| 1786 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1787 | #endif |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1788 | { |
| 1789 | "distance-field-text", |
| 1790 | IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME, |
| 1791 | IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION, |
| 1792 | kOsAll, |
| 1793 | MULTI_VALUE_TYPE(kDistanceFieldTextChoices) |
| 1794 | }, |
[email protected] | 6f8ede3 | 2014-05-09 13:58:45 | [diff] [blame] | 1795 | { |
| 1796 | "extension-content-verification", |
| 1797 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME, |
| 1798 | IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION, |
| 1799 | kOsDesktop, |
| 1800 | MULTI_VALUE_TYPE(kExtensionContentVerificationChoices) |
| 1801 | }, |
[email protected] | 8f374ce | 2014-05-08 23:51:52 | [diff] [blame] | 1802 | #if defined(USE_AURA) |
| 1803 | { |
| 1804 | "text-input-focus-manager", |
| 1805 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME, |
| 1806 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION, |
| 1807 | kOsCrOS | kOsLinux | kOsWin, |
| 1808 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager, |
| 1809 | switches::kDisableTextInputFocusManager) |
| 1810 | }, |
| 1811 | #endif |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1812 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 9858541 | 2014-05-13 19:01:37 | [diff] [blame] | 1813 | { |
| 1814 | "extension-active-script-permission", |
| 1815 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME, |
| 1816 | IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION, |
| 1817 | kOsAll, |
| 1818 | SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction) |
| 1819 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1820 | #endif |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1821 | { |
[email protected] | e79cec2 | 2014-07-26 16:20:29 | [diff] [blame] | 1822 | "harfbuzz-rendertext", |
| 1823 | IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME, |
| 1824 | IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION, |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1825 | kOsDesktop, |
[email protected] | e79cec2 | 2014-07-26 16:20:29 | [diff] [blame] | 1826 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText, |
| 1827 | switches::kDisableHarfBuzzRenderText) |
[email protected] | 5284802 | 2014-05-22 19:01:07 | [diff] [blame] | 1828 | }, |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1829 | #if defined(OS_ANDROID) |
| 1830 | { |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 1831 | "answers-in-suggest", |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1832 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME, |
| 1833 | IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION, |
| 1834 | kOsAndroid, |
[email protected] | 85f710c | 2014-06-20 17:29:11 | [diff] [blame] | 1835 | MULTI_VALUE_TYPE(kAnswersInSuggestChoices) |
[email protected] | 1c790df | 2014-06-03 22:51:12 | [diff] [blame] | 1836 | }, |
| 1837 | #endif |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 1838 | #if defined(OS_ANDROID) |
| 1839 | { |
| 1840 | "enable-data-reduction-proxy-dev", |
| 1841 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME, |
| 1842 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION, |
| 1843 | kOsAndroid, |
| 1844 | ENABLE_DISABLE_VALUE_TYPE( |
| 1845 | data_reduction_proxy::switches::kEnableDataReductionProxyDev, |
| 1846 | data_reduction_proxy::switches::kDisableDataReductionProxyDev) |
| 1847 | }, |
| 1848 | #endif |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 1849 | { |
[email protected] | 49b05f8 | 2014-08-11 09:16:52 | [diff] [blame] | 1850 | "enable-experimental-hotwording", |
| 1851 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME, |
| 1852 | IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION, |
| 1853 | kOsDesktop, |
| 1854 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording) |
[email protected] | 48e67ee7 | 2014-07-01 06:53:43 | [diff] [blame] | 1855 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1856 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 409d920 | 2014-07-08 01:32:41 | [diff] [blame] | 1857 | { |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 1858 | "enable-embedded-extension-options", |
| 1859 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 1860 | IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 1861 | kOsDesktop, |
| 1862 | SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 1863 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1864 | #endif |
Ken Rockot | 19f0e7f | 2014-09-15 23:54:27 | [diff] [blame] | 1865 | { |
[email protected] | 3ba3eb71 | 2014-07-16 07:47:19 | [diff] [blame] | 1866 | "enable-website-settings-manager", |
| 1867 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME, |
| 1868 | IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION, |
| 1869 | kOsDesktop, |
| 1870 | SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager) |
| 1871 | }, |
[email protected] | c5bbe0e | 2014-08-01 23:23:30 | [diff] [blame] | 1872 | { |
| 1873 | "remember-cert-error-decisions", |
| 1874 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 1875 | IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 1876 | kOsAll, |
| 1877 | MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 1878 | }, |
[email protected] | bdbf5cb | 2014-08-07 23:38:08 | [diff] [blame] | 1879 | { |
| 1880 | "enable-drop-sync-credential", |
| 1881 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
| 1882 | IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
| 1883 | kOsAll, |
| 1884 | MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 1885 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1886 | #if defined(ENABLE_EXTENSIONS) |
[email protected] | 2f0b7e0f | 2014-08-15 02:18:23 | [diff] [blame] | 1887 | { |
| 1888 | "enable-extension-action-redesign", |
| 1889 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, |
| 1890 | IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, |
| 1891 | kOsWin | kOsLinux | kOsCrOS, |
| 1892 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) |
| 1893 | }, |
thestig | b012bc3d | 2014-09-18 22:57:13 | [diff] [blame] | 1894 | #endif |
[email protected] | 524dd70 | 2014-08-16 00:00:45 | [diff] [blame] | 1895 | { |
| 1896 | "autofill-sync-credential", |
| 1897 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 1898 | IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 1899 | kOsAll, |
| 1900 | MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 1901 | }, |
juyik | a7be519 | 2014-08-26 23:01:04 | [diff] [blame] | 1902 | #if !defined(OS_ANDROID) |
| 1903 | { |
| 1904 | "enable-message-center-always-scroll-up-upon-notification-removal", |
| 1905 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, |
| 1906 | IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, |
| 1907 | kOsDesktop, |
| 1908 | SINGLE_VALUE_TYPE( |
| 1909 | switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval) |
| 1910 | }, |
| 1911 | #endif |
chirantan | 6e3f35b | 2014-09-16 02:06:11 | [diff] [blame] | 1912 | #if defined(OS_CHROMEOS) |
| 1913 | { |
| 1914 | "wake-on-packets", |
| 1915 | IDS_FLAGS_WAKE_ON_PACKETS_NAME, |
| 1916 | IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION, |
| 1917 | kOsCrOSOwnerOnly, |
| 1918 | SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets) |
| 1919 | }, |
| 1920 | #endif // OS_CHROMEOS |
bengr | 2989fef | 2014-09-18 21:47:38 | [diff] [blame] | 1921 | { |
| 1922 | "enable-data-reduction-proxy-alt", |
| 1923 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME, |
| 1924 | IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION, |
| 1925 | kOsAndroid, |
| 1926 | SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 1927 | kEnableDataReductionProxyAlt) |
| 1928 | }, |
miu | 094342f | 2014-09-26 03:09:46 | [diff] [blame] | 1929 | #if defined(USE_AURA) |
| 1930 | { |
| 1931 | "enable-tab-audio-muting", |
| 1932 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME, |
| 1933 | IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION, |
| 1934 | kOsWin | kOsLinux | kOsCrOS, |
| 1935 | SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting) |
| 1936 | }, |
| 1937 | #endif // defined(USE_AURA) |
mkwst | 531d29fa | 2014-10-02 09:42:07 | [diff] [blame^] | 1938 | { |
| 1939 | "enable-credential-manager-api", |
| 1940 | IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME, |
| 1941 | IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION, |
| 1942 | kOsAll, |
| 1943 | SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI) |
| 1944 | }, |
bengr | 2989fef | 2014-09-18 21:47:38 | [diff] [blame] | 1945 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 1946 | // NOTE: Adding new command-line switches requires adding corresponding |
| 1947 | // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1948 | // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 1949 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1950 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1951 | const Experiment* experiments = kExperiments; |
| 1952 | size_t num_experiments = arraysize(kExperiments); |
| 1953 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1954 | // Stores and encapsulates the little state that about:flags has. |
| 1955 | class FlagsState { |
| 1956 | public: |
| 1957 | FlagsState() : needs_restart_(false) {} |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1958 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 1959 | CommandLine* command_line, |
| 1960 | SentinelsMode sentinels); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1961 | bool IsRestartNeededToCommitChanges(); |
| 1962 | void SetExperimentEnabled( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1963 | FlagsStorage* flags_storage, |
| 1964 | const std::string& internal_name, |
| 1965 | bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1966 | void RemoveFlagsSwitches( |
| 1967 | std::map<std::string, CommandLine::StringType>* switch_list); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1968 | void ResetAllFlags(FlagsStorage* flags_storage); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1969 | void reset(); |
| 1970 | |
| 1971 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1972 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1973 | return Singleton<FlagsState>::get(); |
| 1974 | } |
| 1975 | |
| 1976 | private: |
| 1977 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1978 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1979 | |
| 1980 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 1981 | }; |
| 1982 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1983 | // Adds the internal names for the specified experiment to |names|. |
| 1984 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 1985 | if (e.type == Experiment::SINGLE_VALUE) { |
| 1986 | names->insert(e.internal_name); |
| 1987 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1988 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 1989 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1990 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1991 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1992 | } |
| 1993 | } |
| 1994 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1995 | // Confirms that an experiment is valid, used in a DCHECK in |
| 1996 | // SanitizeList below. |
| 1997 | bool ValidateExperiment(const Experiment& e) { |
| 1998 | switch (e.type) { |
| 1999 | case Experiment::SINGLE_VALUE: |
| 2000 | DCHECK_EQ(0, e.num_choices); |
| 2001 | DCHECK(!e.choices); |
| 2002 | break; |
| 2003 | case Experiment::MULTI_VALUE: |
| 2004 | DCHECK_GT(e.num_choices, 0); |
| 2005 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2006 | DCHECK(e.choices[0].command_line_switch); |
| 2007 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2008 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2009 | case Experiment::ENABLE_DISABLE_VALUE: |
| 2010 | DCHECK_EQ(3, e.num_choices); |
| 2011 | DCHECK(!e.choices); |
| 2012 | DCHECK(e.command_line_switch); |
| 2013 | DCHECK(e.command_line_value); |
| 2014 | DCHECK(e.disable_command_line_switch); |
| 2015 | DCHECK(e.disable_command_line_value); |
| 2016 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2017 | default: |
| 2018 | NOTREACHED(); |
| 2019 | } |
| 2020 | return true; |
| 2021 | } |
| 2022 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2023 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 2024 | // unknown, to prevent this list to become very long as experiments are added |
| 2025 | // and removed. |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2026 | void SanitizeList(FlagsStorage* flags_storage) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2027 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2028 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2029 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2030 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2031 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2032 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2033 | std::set<std::string> enabled_experiments = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2034 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2035 | std::set<std::string> new_enabled_experiments = |
| 2036 | base::STLSetIntersection<std::set<std::string> >( |
| 2037 | known_experiments, enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2038 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 2039 | if (new_enabled_experiments != enabled_experiments) |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2040 | flags_storage->SetFlags(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2041 | } |
| 2042 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2043 | void GetSanitizedEnabledFlags( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2044 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2045 | SanitizeList(flags_storage); |
| 2046 | *result = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2047 | } |
| 2048 | |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2049 | bool SkipConditionalExperiment(const Experiment& experiment, |
| 2050 | FlagsStorage* flags_storage) { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2051 | if (experiment.internal_name == |
| 2052 | std::string("enhanced-bookmarks-experiment")) { |
kkimlabs | b3558ee | 2014-09-29 21:28:37 | [diff] [blame] | 2053 | #if defined(OS_ANDROID) |
| 2054 | // On Android, user can opt in. |
| 2055 | return false; |
| 2056 | #else |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2057 | CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 2058 | // Dont't skip experiment if it has non default value. |
| 2059 | // It means user selected it. |
| 2060 | if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment)) |
| 2061 | return false; |
| 2062 | |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2063 | return !IsEnhancedBookmarksExperimentEnabled(flags_storage); |
kkimlabs | b3558ee | 2014-09-29 21:28:37 | [diff] [blame] | 2064 | #endif |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2065 | } |
kkimlabs | 948ce92d | 2014-09-09 09:06:42 | [diff] [blame] | 2066 | |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 2067 | if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) || |
| 2068 | (experiment.internal_name == |
| 2069 | std::string("manual-enhanced-bookmarks-optout"))) { |
| 2070 | return true; |
| 2071 | } |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 2072 | |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2073 | #if defined(OS_ANDROID) |
bolian | 44ee3baf | 2014-10-01 02:41:54 | [diff] [blame] | 2074 | // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel. |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2075 | if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
bolian | 44ee3baf | 2014-10-01 02:41:54 | [diff] [blame] | 2076 | chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && |
[email protected] | 3dfb401 | 2014-06-11 07:33:38 | [diff] [blame] | 2077 | chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
| 2078 | return true; |
| 2079 | } |
| 2080 | #endif |
| 2081 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2082 | return false; |
| 2083 | } |
| 2084 | |
| 2085 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2086 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 2087 | // enabled on the current platform. |
| 2088 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2089 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 2090 | GetSanitizedEnabledFlags(flags_storage, result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2091 | |
| 2092 | // Filter out any experiments that aren't enabled on the current platform. We |
| 2093 | // don't remove these from prefs else syncing to a platform with a different |
| 2094 | // set of experiments would be lossy. |
| 2095 | std::set<std::string> platform_experiments; |
| 2096 | int current_platform = GetCurrentPlatform(); |
| 2097 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2098 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2099 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 2100 | #if defined(OS_CHROMEOS) |
| 2101 | if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| 2102 | AddInternalName(experiments[i], &platform_experiments); |
| 2103 | #endif |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2104 | } |
| 2105 | |
[email protected] | 09f3fde8 | 2014-05-14 15:08:15 | [diff] [blame] | 2106 | std::set<std::string> new_enabled_experiments = |
| 2107 | base::STLSetIntersection<std::set<std::string> >( |
| 2108 | platform_experiments, *result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2109 | |
| 2110 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2111 | } |
| 2112 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2113 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2114 | base::Value* CreateChoiceData( |
| 2115 | const Experiment& experiment, |
| 2116 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2117 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 2118 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2119 | base::ListValue* result = new base::ListValue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2120 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2121 | base::DictionaryValue* value = new base::DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2122 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2123 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2124 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2125 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2126 | result->Append(value); |
| 2127 | } |
| 2128 | return result; |
| 2129 | } |
| 2130 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2131 | } // namespace |
| 2132 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2133 | std::string Experiment::NameForChoice(int index) const { |
| 2134 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2135 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2136 | DCHECK_LT(index, num_choices); |
| 2137 | return std::string(internal_name) + testing::kMultiSeparator + |
| 2138 | base::IntToString(index); |
| 2139 | } |
| 2140 | |
[email protected] | 9692015 | 2013-12-04 21:00:16 | [diff] [blame] | 2141 | base::string16 Experiment::DescriptionForChoice(int index) const { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2142 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2143 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2144 | DCHECK_LT(index, num_choices); |
| 2145 | int description_id; |
| 2146 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 2147 | const int kEnableDisableDescriptionIds[] = { |
| 2148 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 2149 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 2150 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 2151 | }; |
| 2152 | description_id = kEnableDisableDescriptionIds[index]; |
| 2153 | } else { |
| 2154 | description_id = choices[index].description_id; |
| 2155 | } |
| 2156 | return l10n_util::GetStringUTF16(description_id); |
| 2157 | } |
| 2158 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2159 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2160 | CommandLine* command_line, |
| 2161 | SentinelsMode sentinels) { |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2162 | FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2163 | command_line, |
| 2164 | sentinels); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2165 | } |
| 2166 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2167 | bool AreSwitchesIdenticalToCurrentCommandLine( |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2168 | const CommandLine& new_cmdline, |
| 2169 | const CommandLine& active_cmdline, |
| 2170 | std::set<CommandLine::StringType>* out_difference) { |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2171 | std::set<CommandLine::StringType> new_flags = |
| 2172 | ExtractFlagsFromCommandLine(new_cmdline); |
| 2173 | std::set<CommandLine::StringType> active_flags = |
| 2174 | ExtractFlagsFromCommandLine(active_cmdline); |
| 2175 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2176 | bool result = false; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2177 | // Needed because std::equal doesn't check if the 2nd set is empty. |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2178 | if (new_flags.size() == active_flags.size()) { |
| 2179 | result = |
| 2180 | std::equal(new_flags.begin(), new_flags.end(), active_flags.begin()); |
| 2181 | } |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2182 | |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2183 | if (out_difference && !result) { |
| 2184 | std::set_symmetric_difference( |
| 2185 | new_flags.begin(), |
| 2186 | new_flags.end(), |
| 2187 | active_flags.begin(), |
| 2188 | active_flags.end(), |
| 2189 | std::inserter(*out_difference, out_difference->begin())); |
| 2190 | } |
| 2191 | |
| 2192 | return result; |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2193 | } |
| 2194 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2195 | void GetFlagsExperimentsData(FlagsStorage* flags_storage, |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2196 | FlagAccess access, |
| 2197 | base::ListValue* supported_experiments, |
| 2198 | base::ListValue* unsupported_experiments) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2199 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2200 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2201 | |
| 2202 | int current_platform = GetCurrentPlatform(); |
| 2203 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2204 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2205 | const Experiment& experiment = experiments[i]; |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2206 | if (SkipConditionalExperiment(experiment, flags_storage)) |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2207 | continue; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2208 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2209 | base::DictionaryValue* data = new base::DictionaryValue(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2210 | data->SetString("internal_name", experiment.internal_name); |
| 2211 | data->SetString("name", |
| 2212 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 2213 | data->SetString("description", |
| 2214 | l10n_util::GetStringUTF16( |
| 2215 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2216 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2217 | base::ListValue* supported_platforms = new base::ListValue(); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2218 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 2219 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2220 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2221 | switch (experiment.type) { |
| 2222 | case Experiment::SINGLE_VALUE: |
| 2223 | data->SetBoolean( |
| 2224 | "enabled", |
| 2225 | enabled_experiments.count(experiment.internal_name) > 0); |
| 2226 | break; |
| 2227 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2228 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2229 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 2230 | break; |
| 2231 | default: |
| 2232 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2233 | } |
| 2234 | |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2235 | bool supported = (experiment.supported_platforms & current_platform) != 0; |
| 2236 | #if defined(OS_CHROMEOS) |
| 2237 | if (access == kOwnerAccessToFlags && |
| 2238 | (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2239 | supported = true; |
| 2240 | } |
| 2241 | #endif |
| 2242 | if (supported) |
| 2243 | supported_experiments->Append(data); |
| 2244 | else |
| 2245 | unsupported_experiments->Append(data); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2246 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2247 | } |
| 2248 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2249 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2250 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2251 | } |
| 2252 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2253 | void SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2254 | const std::string& internal_name, |
| 2255 | bool enable) { |
| 2256 | FlagsState::GetInstance()->SetExperimentEnabled(flags_storage, |
| 2257 | internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2258 | } |
| 2259 | |
| 2260 | void RemoveFlagsSwitches( |
| 2261 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2262 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2263 | } |
| 2264 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2265 | void ResetAllFlags(FlagsStorage* flags_storage) { |
| 2266 | FlagsState::GetInstance()->ResetAllFlags(flags_storage); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2267 | } |
| 2268 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2269 | int GetCurrentPlatform() { |
| 2270 | #if defined(OS_MACOSX) |
| 2271 | return kOsMac; |
| 2272 | #elif defined(OS_WIN) |
| 2273 | return kOsWin; |
| 2274 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 2275 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 2276 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2277 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 2278 | #elif defined(OS_ANDROID) |
| 2279 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2280 | #else |
| 2281 | #error Unknown platform |
| 2282 | #endif |
| 2283 | } |
| 2284 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2285 | void RecordUMAStatistics(FlagsStorage* flags_storage) { |
| 2286 | std::set<std::string> flags = flags_storage->GetFlags(); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2287 | for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
| 2288 | ++it) { |
| 2289 | std::string action("AboutFlags_"); |
| 2290 | action += *it; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2291 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2292 | } |
| 2293 | // Since flag metrics are recorded every startup, add a tick so that the |
| 2294 | // stats can be made meaningful. |
| 2295 | if (flags.size()) |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2296 | content::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); |
| 2297 | content::RecordAction(UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2298 | } |
| 2299 | |
alemate | 0107c327 | 2014-09-03 04:30:04 | [diff] [blame] | 2300 | base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) { |
| 2301 | return static_cast<base::HistogramBase::Sample>( |
| 2302 | metrics::HashMetricName(switch_name)); |
[email protected] | 4b66a7d | 2014-08-15 17:13:31 | [diff] [blame] | 2303 | } |
| 2304 | |
| 2305 | void ReportCustomFlags(const std::string& uma_histogram_hame, |
| 2306 | const std::set<std::string>& command_line_difference) { |
| 2307 | for (std::set<std::string>::const_iterator it = |
| 2308 | command_line_difference.begin(); |
| 2309 | it != command_line_difference.end(); |
| 2310 | ++it) { |
| 2311 | int uma_id = about_flags::kBadSwitchFormatHistogramId; |
| 2312 | if (StartsWithASCII(*it, "--", true /* case_sensitive */)) { |
| 2313 | // Skip '--' before switch name. |
| 2314 | std::string switch_name(it->substr(2)); |
| 2315 | |
| 2316 | // Kill value, if any. |
| 2317 | const size_t value_pos = switch_name.find('='); |
| 2318 | if (value_pos != std::string::npos) |
| 2319 | switch_name.resize(value_pos); |
| 2320 | |
| 2321 | uma_id = GetSwitchUMAId(switch_name); |
| 2322 | } else { |
| 2323 | NOTREACHED() << "ReportCustomFlags(): flag '" << *it |
| 2324 | << "' has incorrect format."; |
| 2325 | } |
| 2326 | DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame |
| 2327 | << "' '" << *it << "', uma_id=" << uma_id; |
| 2328 | |
| 2329 | // Sparse histogram macro does not cache the histogram, so it's safe |
| 2330 | // to use macro with non-static histogram name here. |
| 2331 | UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id); |
| 2332 | } |
| 2333 | } |
| 2334 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2335 | ////////////////////////////////////////////////////////////////////////////// |
| 2336 | // FlagsState implementation. |
| 2337 | |
| 2338 | namespace { |
| 2339 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2340 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 2341 | NameToSwitchAndValueMap; |
| 2342 | |
| 2343 | void SetFlagToSwitchMapping(const std::string& key, |
| 2344 | const std::string& switch_name, |
| 2345 | const std::string& switch_value, |
| 2346 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 2347 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 2348 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 2349 | } |
| 2350 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2351 | void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| 2352 | CommandLine* command_line, |
| 2353 | SentinelsMode sentinels) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2354 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2355 | return; |
| 2356 | |
| 2357 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 2358 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2359 | GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, |
| 2360 | &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2361 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2362 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2363 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2364 | const Experiment& e = experiments[i]; |
| 2365 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2366 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 2367 | e.command_line_value, &name_to_switch_map); |
| 2368 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 2369 | for (int j = 0; j < e.num_choices; ++j) { |
| 2370 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 2371 | e.choices[j].command_line_switch, |
| 2372 | e.choices[j].command_line_value, |
| 2373 | &name_to_switch_map); |
| 2374 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2375 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2376 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 2377 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 2378 | &name_to_switch_map); |
| 2379 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 2380 | e.command_line_value, &name_to_switch_map); |
| 2381 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 2382 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2383 | } |
| 2384 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2385 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2386 | if (sentinels == kAddSentinels) { |
| 2387 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
| 2388 | flags_switches_.insert( |
| 2389 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 2390 | std::string())); |
| 2391 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2392 | for (std::set<std::string>::iterator it = enabled_experiments.begin(); |
| 2393 | it != enabled_experiments.end(); |
| 2394 | ++it) { |
| 2395 | const std::string& experiment_name = *it; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2396 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2397 | name_to_switch_map.find(experiment_name); |
| 2398 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 2399 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2400 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2401 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2402 | |
yefim | ff0c52f | 2014-09-24 20:19:50 | [diff] [blame] | 2403 | #if defined(OS_CHROMEOS) |
| 2404 | // On Chrome OS setting command line flag may make browser to restart on |
| 2405 | // user login. As this flag eventually will be set to a significant number |
| 2406 | // of users skip manual-enhanced-bookmarks to avoid restart. |
| 2407 | if (experiment_name == "manual-enhanced-bookmarks") |
| 2408 | continue; |
| 2409 | #endif |
| 2410 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2411 | const std::pair<std::string, std::string>& |
| 2412 | switch_and_value_pair = name_to_switch_it->second; |
| 2413 | |
[email protected] | 9737b363 | 2013-08-26 09:23:23 | [diff] [blame] | 2414 | CHECK(!switch_and_value_pair.first.empty()); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2415 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 2416 | switch_and_value_pair.second); |
| 2417 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2418 | } |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2419 | if (sentinels == kAddSentinels) { |
| 2420 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
| 2421 | flags_switches_.insert( |
| 2422 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 2423 | std::string())); |
| 2424 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2425 | } |
| 2426 | |
| 2427 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 2428 | return needs_restart_; |
| 2429 | } |
| 2430 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2431 | void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2432 | const std::string& internal_name, |
| 2433 | bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2434 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2435 | if (at_index != std::string::npos) { |
| 2436 | DCHECK(enable); |
| 2437 | // We're being asked to enable a multi-choice experiment. Disable the |
| 2438 | // currently selected choice. |
| 2439 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2440 | const std::string experiment_name = internal_name.substr(0, at_index); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2441 | SetExperimentEnabled(flags_storage, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2442 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2443 | // And enable the new choice, if it is not the default first choice. |
| 2444 | if (internal_name != experiment_name + "@0") { |
| 2445 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2446 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2447 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2448 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2449 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2450 | return; |
| 2451 | } |
| 2452 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2453 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2454 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2455 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2456 | const Experiment* e = NULL; |
| 2457 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2458 | if (experiments[i].internal_name == internal_name) { |
| 2459 | e = experiments + i; |
| 2460 | break; |
| 2461 | } |
| 2462 | } |
| 2463 | DCHECK(e); |
| 2464 | |
| 2465 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2466 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2467 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2468 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2469 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2470 | } else { |
| 2471 | if (enable) { |
| 2472 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2473 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2474 | } else { |
| 2475 | // Find the currently enabled choice and disable it. |
| 2476 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2477 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2478 | if (enabled_experiments.find(choice_name) != |
| 2479 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2480 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2481 | enabled_experiments.erase(choice_name); |
| 2482 | // Continue on just in case there's a bug and more than one |
| 2483 | // experiment for this choice was enabled. |
| 2484 | } |
| 2485 | } |
| 2486 | } |
| 2487 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2488 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2489 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2490 | } |
| 2491 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2492 | void FlagsState::RemoveFlagsSwitches( |
| 2493 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2494 | for (std::map<std::string, std::string>::const_iterator |
| 2495 | it = flags_switches_.begin(); it != flags_switches_.end(); ++it) { |
| 2496 | switch_list->erase(it->first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2497 | } |
| 2498 | } |
| 2499 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2500 | void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) { |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2501 | needs_restart_ = true; |
| 2502 | |
| 2503 | std::set<std::string> no_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2504 | flags_storage->SetFlags(no_experiments); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2505 | } |
| 2506 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2507 | void FlagsState::reset() { |
| 2508 | needs_restart_ = false; |
| 2509 | flags_switches_.clear(); |
| 2510 | } |
| 2511 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 2512 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2513 | |
| 2514 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2515 | |
| 2516 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 2517 | // also need to update the html file. |
| 2518 | const char kMultiSeparator[] = "@"; |
| 2519 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2520 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2521 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2522 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2523 | |
| 2524 | void SetExperiments(const Experiment* e, size_t count) { |
| 2525 | if (!e) { |
| 2526 | experiments = kExperiments; |
| 2527 | num_experiments = arraysize(kExperiments); |
| 2528 | } else { |
| 2529 | experiments = e; |
| 2530 | num_experiments = count; |
| 2531 | } |
| 2532 | } |
| 2533 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2534 | const Experiment* GetExperiments(size_t* count) { |
| 2535 | *count = num_experiments; |
| 2536 | return experiments; |
| 2537 | } |
| 2538 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2539 | } // namespace testing |
| 2540 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2541 | } // namespace about_flags |