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

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

Issue 803443006: Adding flag to specify the used memory pressure strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const Experiment::Choice kEnableGpuRasterizationChoices[] = { 277 const Experiment::Choice kEnableGpuRasterizationChoices[] = {
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 278 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
279 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 279 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
280 switches::kEnableGpuRasterization, "" }, 280 switches::kEnableGpuRasterization, "" },
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 281 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
282 switches::kDisableGpuRasterization, "" }, 282 switches::kDisableGpuRasterization, "" },
283 { IDS_FLAGS_FORCE_GPU_RASTERIZATION, 283 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
284 switches::kForceGpuRasterization, "" }, 284 switches::kForceGpuRasterization, "" },
285 }; 285 };
286 286
287 #if defined(OS_CHROMEOS)
288 const Experiment::Choice kMemoryPressureThresholdChoices[] = {
289 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
290 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS,
291 chromeos::switches::kMemoryPressureThresholds, "1" },
292 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS,
293 chromeos::switches::kMemoryPressureThresholds, "2" },
294 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS,
295 chromeos::switches::kMemoryPressureThresholds, "3" },
296 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS,
297 chromeos::switches::kMemoryPressureThresholds, "4" },
298 };
299 #endif
300
287 // We're using independent flags here (as opposed to a common flag with 301 // We're using independent flags here (as opposed to a common flag with
288 // different values) to be able to enable/disable the entire experience 302 // different values) to be able to enable/disable the entire experience
289 // associated with this feature server-side from the FieldTrial (the complete 303 // associated with this feature server-side from the FieldTrial (the complete
290 // experience includes other flag changes as well). It is not currently possible 304 // experience includes other flag changes as well). It is not currently possible
291 // to do that with "flag=value" flags. 305 // to do that with "flag=value" flags.
292 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { 306 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
293 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 307 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 308 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
295 switches::kDisableSearchButtonInOmnibox, ""}, 309 switches::kDisableSearchButtonInOmnibox, ""},
296 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, 310 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 #endif 2010 #endif
1997 #if defined(OS_CHROMEOS) 2011 #if defined(OS_CHROMEOS)
1998 { 2012 {
1999 "disable-memory-pressure-chromeos", 2013 "disable-memory-pressure-chromeos",
2000 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME, 2014 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME,
2001 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION, 2015 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION,
2002 kOsCrOS, 2016 kOsCrOS,
2003 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS) 2017 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS)
2004 }, 2018 },
2005 { 2019 {
2020 "memory-pressure-thresholds",
2021 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME,
2022 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION,
2023 kOsCrOS,
2024 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices)
2025 },
2026 {
2006 "wake-on-packets", 2027 "wake-on-packets",
2007 IDS_FLAGS_WAKE_ON_PACKETS_NAME, 2028 IDS_FLAGS_WAKE_ON_PACKETS_NAME,
2008 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION, 2029 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION,
2009 kOsCrOSOwnerOnly, 2030 kOsCrOSOwnerOnly,
2010 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets) 2031 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets)
2011 }, 2032 },
2012 #endif // OS_CHROMEOS 2033 #endif // OS_CHROMEOS
2013 { 2034 {
2014 "enable-tab-audio-muting", 2035 "enable-tab-audio-muting",
2015 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME, 2036 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME,
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 } 2719 }
2699 2720
2700 const Experiment* GetExperiments(size_t* count) { 2721 const Experiment* GetExperiments(size_t* count) {
2701 *count = num_experiments; 2722 *count = num_experiments;
2702 return experiments; 2723 return experiments;
2703 } 2724 }
2704 2725
2705 } // namespace testing 2726 } // namespace testing
2706 2727
2707 } // namespace about_flags 2728 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698