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

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

Issue 897413002: Add a finch experiment for different memory pressure management strategies in ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the code review comments. Created 5 years, 10 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
« no previous file with comments | « no previous file | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 289 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
290 switches::kEnableGpuRasterization, "" }, 290 switches::kEnableGpuRasterization, "" },
291 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 291 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
292 switches::kDisableGpuRasterization, "" }, 292 switches::kDisableGpuRasterization, "" },
293 { IDS_FLAGS_FORCE_GPU_RASTERIZATION, 293 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
294 switches::kForceGpuRasterization, "" }, 294 switches::kForceGpuRasterization, "" },
295 }; 295 };
296 296
297 #if defined(OS_CHROMEOS) 297 #if defined(OS_CHROMEOS)
298 const Experiment::Choice kMemoryPressureThresholdChoices[] = { 298 const Experiment::Choice kMemoryPressureThresholdChoices[] = {
299 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 299 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
300 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS, 300 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS,
301 chromeos::switches::kMemoryPressureThresholds, "1" }, 301 chromeos::switches::kMemoryPressureThresholds,
302 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS, 302 chromeos::switches::kConservativeThreshold },
303 chromeos::switches::kMemoryPressureThresholds, "2" }, 303 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS,
304 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS, 304 chromeos::switches::kMemoryPressureThresholds,
305 chromeos::switches::kMemoryPressureThresholds, "3" }, 305 chromeos::switches::kAggressiveCacheDiscardThreshold },
306 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS, 306 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS,
307 chromeos::switches::kMemoryPressureThresholds, "4" }, 307 chromeos::switches::kMemoryPressureThresholds,
308 chromeos::switches::kAggressiveTabDiscardThreshold },
309 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS,
310 chromeos::switches::kMemoryPressureThresholds,
311 chromeos::switches::kAggressiveThreshold },
308 }; 312 };
309 #endif 313 #endif
310 314
311 // We're using independent flags here (as opposed to a common flag with 315 // We're using independent flags here (as opposed to a common flag with
312 // different values) to be able to enable/disable the entire experience 316 // different values) to be able to enable/disable the entire experience
313 // associated with this feature server-side from the FieldTrial (the complete 317 // associated with this feature server-side from the FieldTrial (the complete
314 // experience includes other flag changes as well). It is not currently possible 318 // experience includes other flag changes as well). It is not currently possible
315 // to do that with "flag=value" flags. 319 // to do that with "flag=value" flags.
316 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { 320 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
317 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 321 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 } 2750 }
2747 2751
2748 const Experiment* GetExperiments(size_t* count) { 2752 const Experiment* GetExperiments(size_t* count) {
2749 *count = num_experiments; 2753 *count = num_experiments;
2750 return experiments; 2754 return experiments;
2751 } 2755 }
2752 2756
2753 } // namespace testing 2757 } // namespace testing
2754 2758
2755 } // namespace about_flags 2759 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698