OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, | 218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
219 cc::switches::kMaxTilesForInterestArea, "64"}, | 219 cc::switches::kMaxTilesForInterestArea, "64"}, |
220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, | 220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
221 cc::switches::kMaxTilesForInterestArea, "128"}, | 221 cc::switches::kMaxTilesForInterestArea, "128"}, |
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, | 222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
223 cc::switches::kMaxTilesForInterestArea, "256"}, | 223 cc::switches::kMaxTilesForInterestArea, "256"}, |
224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, | 224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
225 cc::switches::kMaxTilesForInterestArea, "512"} | 225 cc::switches::kMaxTilesForInterestArea, "512"} |
226 }; | 226 }; |
227 | 227 |
| 228 const Experiment::Choice kSimpleCacheBackendChoices[] = { |
| 229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", "off" }, |
| 230 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 231 switches::kUseSimpleCacheBackend, "on"} |
| 232 }; |
| 233 |
228 // RECORDING USER METRICS FOR FLAGS: | 234 // RECORDING USER METRICS FOR FLAGS: |
229 // ----------------------------------------------------------------------------- | 235 // ----------------------------------------------------------------------------- |
230 // The first line of the experiment is the internal name. If you'd like to | 236 // The first line of the experiment is the internal name. If you'd like to |
231 // gather statistics about the usage of your flag, you should append a marker | 237 // gather statistics about the usage of your flag, you should append a marker |
232 // comment to the end of the feature name, like so: | 238 // comment to the end of the feature name, like so: |
233 // "my-special-feature", // FLAGS:RECORD_UMA | 239 // "my-special-feature", // FLAGS:RECORD_UMA |
234 // | 240 // |
235 // After doing that, run //chrome/tools/extract_actions.py (see instructions at | 241 // After doing that, run //chrome/tools/extract_actions.py (see instructions at |
236 // the top of that file for details) to update the chromeactions.txt file, which | 242 // the top of that file for details) to update the chromeactions.txt file, which |
237 // will enable UMA to record your feature flag. | 243 // will enable UMA to record your feature flag. |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 }, | 1317 }, |
1312 #if defined(OS_CHROMEOS) | 1318 #if defined(OS_CHROMEOS) |
1313 { | 1319 { |
1314 "enable-virtual-keyboard", | 1320 "enable-virtual-keyboard", |
1315 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, | 1321 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
1316 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, | 1322 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
1317 kOsCrOS, | 1323 kOsCrOS, |
1318 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) | 1324 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
1319 }, | 1325 }, |
1320 #endif | 1326 #endif |
| 1327 { |
| 1328 "enable-simple-cache-backend", |
| 1329 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1330 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
| 1331 kOsAndroid, |
| 1332 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1333 }, |
1321 }; | 1334 }; |
1322 | 1335 |
1323 const Experiment* experiments = kExperiments; | 1336 const Experiment* experiments = kExperiments; |
1324 size_t num_experiments = arraysize(kExperiments); | 1337 size_t num_experiments = arraysize(kExperiments); |
1325 | 1338 |
1326 // Stores and encapsulates the little state that about:flags has. | 1339 // Stores and encapsulates the little state that about:flags has. |
1327 class FlagsState { | 1340 class FlagsState { |
1328 public: | 1341 public: |
1329 FlagsState() : needs_restart_(false) {} | 1342 FlagsState() : needs_restart_(false) {} |
1330 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 1343 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 } | 1824 } |
1812 | 1825 |
1813 const Experiment* GetExperiments(size_t* count) { | 1826 const Experiment* GetExperiments(size_t* count) { |
1814 *count = num_experiments; | 1827 *count = num_experiments; |
1815 return experiments; | 1828 return experiments; |
1816 } | 1829 } |
1817 | 1830 |
1818 } // namespace testing | 1831 } // namespace testing |
1819 | 1832 |
1820 } // namespace about_flags | 1833 } // namespace about_flags |
OLD | NEW |