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

Side by Side Diff: chromeos/chromeos_switches.cc

Issue 1022333002: Initial CL for Data Saver (Flywheel) prompt when cellular network detected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small cleanup for review Created 5 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 "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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 const char kArtifactsDir[] = "artifacts-dir"; 315 const char kArtifactsDir[] = "artifacts-dir";
316 316
317 // Bypass proxy for captive portal authorization. 317 // Bypass proxy for captive portal authorization.
318 const char kEnableCaptivePortalBypassProxy[] = 318 const char kEnableCaptivePortalBypassProxy[] =
319 "enable-captive-portal-bypass-proxy"; 319 "enable-captive-portal-bypass-proxy";
320 320
321 // Disable automatic timezone update. 321 // Disable automatic timezone update.
322 const char kDisableTimeZoneTrackingOption[] = 322 const char kDisableTimeZoneTrackingOption[] =
323 "disable-timezone-tracking-option"; 323 "disable-timezone-tracking-option";
324 324
325 // Switches and optional value for Data Saver prompt on cellular networks.
326 const char kDisableDataSaverPrompt[] = "disable-datasaver-prompt";
327 const char kEnableDataSaverPrompt[] = "enable-datasaver-prompt";
328 const char kDataSaverPromptDemoMode[] = "demo";
329
325 bool WakeOnWifiEnabled() { 330 bool WakeOnWifiEnabled() {
326 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); 331 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi);
327 } 332 }
328 333
329 bool MemoryPressureHandlingEnabled() { 334 bool MemoryPressureHandlingEnabled() {
330 if ((base::CommandLine::ForCurrentProcess()->HasSwitch( 335 if ((base::CommandLine::ForCurrentProcess()->HasSwitch(
331 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) || 336 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) ||
332 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) == 337 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) ==
333 kMemoryPressureHandlingOff)) 338 kMemoryPressureHandlingOff))
334 return false; 339 return false;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 return base::MemoryPressureObserverChromeOS:: 371 return base::MemoryPressureObserverChromeOS::
367 THRESHOLD_AGGRESSIVE_TAB_DISCARD; 372 THRESHOLD_AGGRESSIVE_TAB_DISCARD;
368 if (option == kAggressiveThreshold) 373 if (option == kAggressiveThreshold)
369 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE; 374 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE;
370 375
371 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT; 376 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT;
372 } 377 }
373 378
374 } // namespace switches 379 } // namespace switches
375 } // namespace chromeos 380 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698