Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: chrome/browser/about_flags.cc

Issue 13862014: Add Simple Cache choice to about:flags (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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[] = {
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
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 kOsAndroid,
1322 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1323 }
gavinp 2013/04/10 13:06:10 nit: }, Always add that final comma.
pasko-google - do not use 2013/04/10 13:55:02 Done.
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
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
OLDNEW
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698