| 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 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 | 9 |
| 10 // TODO(rsorokin): alphabetize all of these switches so they | 10 // TODO(rsorokin): alphabetize all of these switches so they |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 // Enable Chrome OS firewall hole-punching for Chrome Apps. | 339 // Enable Chrome OS firewall hole-punching for Chrome Apps. |
| 340 const char kEnableFirewallHolePunching[] = "enable-firewall-hole-punching"; | 340 const char kEnableFirewallHolePunching[] = "enable-firewall-hole-punching"; |
| 341 | 341 |
| 342 // Enables searching for an app that supports a plugged in USB printer. When a | 342 // Enables searching for an app that supports a plugged in USB printer. When a |
| 343 // user plugs in USB printer, they are shown a notification offering to search | 343 // user plugs in USB printer, they are shown a notification offering to search |
| 344 // Chroem Web Store for an app that has printerProvider permission and can | 344 // Chroem Web Store for an app that has printerProvider permission and can |
| 345 // handle the plugged in printer. | 345 // handle the plugged in printer. |
| 346 const char kEnablePrinterAppSearch[] = "enable-printer-app-search"; | 346 const char kEnablePrinterAppSearch[] = "enable-printer-app-search"; |
| 347 | 347 |
| 348 // Switches and optional value for Data Saver prompt on cellular networks. |
| 349 const char kDisableDataSaverPrompt[] = "disable-datasaver-prompt"; |
| 350 const char kEnableDataSaverPrompt[] = "enable-datasaver-prompt"; |
| 351 const char kDataSaverPromptDemoMode[] = "demo"; |
| 352 |
| 348 bool WakeOnWifiEnabled() { | 353 bool WakeOnWifiEnabled() { |
| 349 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); | 354 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); |
| 350 } | 355 } |
| 351 | 356 |
| 352 bool MemoryPressureHandlingEnabled() { | 357 bool MemoryPressureHandlingEnabled() { |
| 353 if ((base::CommandLine::ForCurrentProcess()->HasSwitch( | 358 if ((base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 354 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) || | 359 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) || |
| 355 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) == | 360 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) == |
| 356 kMemoryPressureHandlingOff)) | 361 kMemoryPressureHandlingOff)) |
| 357 return false; | 362 return false; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 return base::MemoryPressureObserverChromeOS:: | 394 return base::MemoryPressureObserverChromeOS:: |
| 390 THRESHOLD_AGGRESSIVE_TAB_DISCARD; | 395 THRESHOLD_AGGRESSIVE_TAB_DISCARD; |
| 391 if (option == kAggressiveThreshold) | 396 if (option == kAggressiveThreshold) |
| 392 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE; | 397 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE; |
| 393 | 398 |
| 394 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT; | 399 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT; |
| 395 } | 400 } |
| 396 | 401 |
| 397 } // namespace switches | 402 } // namespace switches |
| 398 } // namespace chromeos | 403 } // namespace chromeos |
| OLD | NEW |