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 "chromeos/chromeos_switches.h" | 5 #include "chromeos/chromeos_switches.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 | 8 |
| 9 namespace chromeos { | 9 namespace chromeos { |
| 10 namespace switches { | 10 namespace switches { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 // Specifies the profile to use once a chromeos user is logged in. | 206 // Specifies the profile to use once a chromeos user is logged in. |
| 207 // This parameter is ignored if user goes through login screen since user_id | 207 // This parameter is ignored if user goes through login screen since user_id |
| 208 // hash defines which profile directory to use. | 208 // hash defines which profile directory to use. |
| 209 // In case of browser restart within active session this parameter is used | 209 // In case of browser restart within active session this parameter is used |
| 210 // to pass user_id hash for primary user. | 210 // to pass user_id hash for primary user. |
| 211 const char kLoginProfile[] = "login-profile"; | 211 const char kLoginProfile[] = "login-profile"; |
| 212 | 212 |
| 213 // Specifies the user which is already logged in. | 213 // Specifies the user which is already logged in. |
| 214 const char kLoginUser[] = "login-user"; | 214 const char kLoginUser[] = "login-user"; |
| 215 | 215 |
| 216 // The memory pressure thresholds selection which is used to decide when a | |
| 217 // memory pressure event needs to get fired. | |
| 218 const char kMemoryPressureThresholds[] = "memory-pressure-thresholds"; | |
| 219 | |
| 216 // Enables natural scroll by default. | 220 // Enables natural scroll by default. |
| 217 const char kNaturalScrollDefault[] = "enable-natural-scroll-default"; | 221 const char kNaturalScrollDefault[] = "enable-natural-scroll-default"; |
| 218 | 222 |
| 219 // Skips all other OOBE pages after user login. | 223 // Skips all other OOBE pages after user login. |
| 220 const char kOobeSkipPostLogin[] = "oobe-skip-postlogin"; | 224 const char kOobeSkipPostLogin[] = "oobe-skip-postlogin"; |
| 221 | 225 |
| 222 // Disable GAIA services such as enrollment and OAuth session restore. Used by | 226 // Disable GAIA services such as enrollment and OAuth session restore. Used by |
| 223 // 'fake' telemetry login. | 227 // 'fake' telemetry login. |
| 224 const char kDisableGaiaServices[] = "disable-gaia-services"; | 228 const char kDisableGaiaServices[] = "disable-gaia-services"; |
| 225 | 229 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 const char kArtifactsDir[] = "artifacts-dir"; | 289 const char kArtifactsDir[] = "artifacts-dir"; |
| 286 | 290 |
| 287 // Bypass proxy for captive portal authorization. | 291 // Bypass proxy for captive portal authorization. |
| 288 const char kEnableCaptivePortalBypassProxy[] = | 292 const char kEnableCaptivePortalBypassProxy[] = |
| 289 "enable-captive-portal-bypass-proxy"; | 293 "enable-captive-portal-bypass-proxy"; |
| 290 | 294 |
| 291 bool WakeOnWifiEnabled() { | 295 bool WakeOnWifiEnabled() { |
| 292 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); | 296 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); |
| 293 } | 297 } |
| 294 | 298 |
| 299 base::MemoryPressureObserverChromeOS::MemoryPressureThresholds | |
| 300 GetMemoryPressureThresholds() { | |
| 301 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 302 kMemoryPressureThresholds)) { | |
| 303 return base::MemoryPressureObserverChromeOS:: | |
| 304 MEMORY_PRESSURE_THRESHOLD_DEFAULT; | |
| 305 } | |
| 306 const std::string option = | |
| 307 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | |
| 308 kMemoryPressureThresholds); | |
| 309 if (option == "1") | |
|
Charlie Reis
2015/01/21 19:37:55
nit: These all need braces because the body doesn'
Mr4D (OOO till 08-26)
2015/01/21 21:01:35
Done.
| |
| 310 return base::MemoryPressureObserverChromeOS:: | |
| 311 MEMORY_PRESSURE_THRESHOLD_CONSERVATIVE; | |
| 312 if (option == "2") | |
| 313 return base::MemoryPressureObserverChromeOS:: | |
| 314 MEMORY_PRESSURE_THRESHOLD_AGGRESSIVE_CACHE_DISCARD; | |
| 315 if (option == "3") | |
| 316 return base::MemoryPressureObserverChromeOS:: | |
| 317 MEMORY_PRESSURE_THRESHOLD_AGGRESSIVE_TAB_DISCARD; | |
| 318 return base::MemoryPressureObserverChromeOS:: | |
| 319 MEMORY_PRESSURE_THRESHOLD_AGGRESSIVE; | |
| 320 } | |
| 321 | |
| 295 } // namespace switches | 322 } // namespace switches |
| 296 } // namespace chromeos | 323 } // namespace chromeos |
| OLD | NEW |