Chromium Code Reviews| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, | 217 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 218 cc::switches::kMaxTilesForInterestArea, "64"}, | 218 cc::switches::kMaxTilesForInterestArea, "64"}, |
| 219 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, | 219 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 220 cc::switches::kMaxTilesForInterestArea, "128"}, | 220 cc::switches::kMaxTilesForInterestArea, "128"}, |
| 221 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, | 221 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 222 cc::switches::kMaxTilesForInterestArea, "256"}, | 222 cc::switches::kMaxTilesForInterestArea, "256"}, |
| 223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, | 223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 224 cc::switches::kMaxTilesForInterestArea, "512"} | 224 cc::switches::kMaxTilesForInterestArea, "512"} |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 const Experiment::Choice kSimpleCacheBackendChoices[] = { | |
|
rvargas (doing something else)
2013/04/09 19:02:47
This should only be there for Android
| |
| 228 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", "off" }, | |
| 229 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | |
| 230 switches::kUseSimpleCacheBackend, "on"} | |
| 231 }; | |
| 232 | |
| 227 // RECORDING USER METRICS FOR FLAGS: | 233 // RECORDING USER METRICS FOR FLAGS: |
| 228 // ----------------------------------------------------------------------------- | 234 // ----------------------------------------------------------------------------- |
| 229 // The first line of the experiment is the internal name. If you'd like to | 235 // The first line of the experiment is the internal name. If you'd like to |
| 230 // gather statistics about the usage of your flag, you should append a marker | 236 // gather statistics about the usage of your flag, you should append a marker |
| 231 // comment to the end of the feature name, like so: | 237 // comment to the end of the feature name, like so: |
| 232 // "my-special-feature", // FLAGS:RECORD_UMA | 238 // "my-special-feature", // FLAGS:RECORD_UMA |
| 233 // | 239 // |
| 234 // After doing that, run //chrome/tools/extract_actions.py (see instructions at | 240 // After doing that, run //chrome/tools/extract_actions.py (see instructions at |
| 235 // the top of that file for details) to update the chromeactions.txt file, which | 241 // the top of that file for details) to update the chromeactions.txt file, which |
| 236 // will enable UMA to record your feature flag. | 242 // will enable UMA to record your feature flag. |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1301 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration) | 1307 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration) |
| 1302 }, | 1308 }, |
| 1303 #endif | 1309 #endif |
| 1304 { | 1310 { |
| 1305 "enable-translate-alpha-languages", | 1311 "enable-translate-alpha-languages", |
| 1306 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME, | 1312 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME, |
| 1307 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION, | 1313 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION, |
| 1308 kOsAll, | 1314 kOsAll, |
| 1309 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages) | 1315 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages) |
| 1310 }, | 1316 }, |
| 1317 { | |
| 1318 "enable-simple-cache-backend", | |
| 1319 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, | |
| 1320 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, | |
| 1321 kOsAll, | |
| 1322 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) | |
| 1323 } | |
| 1311 }; | 1324 }; |
| 1312 | 1325 |
| 1313 const Experiment* experiments = kExperiments; | 1326 const Experiment* experiments = kExperiments; |
| 1314 size_t num_experiments = arraysize(kExperiments); | 1327 size_t num_experiments = arraysize(kExperiments); |
| 1315 | 1328 |
| 1316 // Stores and encapsulates the little state that about:flags has. | 1329 // Stores and encapsulates the little state that about:flags has. |
| 1317 class FlagsState { | 1330 class FlagsState { |
| 1318 public: | 1331 public: |
| 1319 FlagsState() : needs_restart_(false) {} | 1332 FlagsState() : needs_restart_(false) {} |
| 1320 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 1333 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1801 } | 1814 } |
| 1802 | 1815 |
| 1803 const Experiment* GetExperiments(size_t* count) { | 1816 const Experiment* GetExperiments(size_t* count) { |
| 1804 *count = num_experiments; | 1817 *count = num_experiments; |
| 1805 return experiments; | 1818 return experiments; |
| 1806 } | 1819 } |
| 1807 | 1820 |
| 1808 } // namespace testing | 1821 } // namespace testing |
| 1809 | 1822 |
| 1810 } // namespace about_flags | 1823 } // namespace about_flags |
| OLD | NEW |