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

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: Created 5 years, 9 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 // Enable Data Saver prompt on 3G networks.
326 const char kEnableDataSaverPrompt[] = "enable-datasaver-prompt";
327
325 bool WakeOnWifiEnabled() { 328 bool WakeOnWifiEnabled() {
326 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); 329 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi);
327 } 330 }
328 331
329 bool MemoryPressureHandlingEnabled() { 332 bool MemoryPressureHandlingEnabled() {
330 if ((base::CommandLine::ForCurrentProcess()->HasSwitch( 333 if ((base::CommandLine::ForCurrentProcess()->HasSwitch(
331 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) || 334 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) ||
332 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) == 335 (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) ==
333 kMemoryPressureHandlingOff)) 336 kMemoryPressureHandlingOff))
334 return false; 337 return false;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 return base::MemoryPressureObserverChromeOS:: 369 return base::MemoryPressureObserverChromeOS::
367 THRESHOLD_AGGRESSIVE_TAB_DISCARD; 370 THRESHOLD_AGGRESSIVE_TAB_DISCARD;
368 if (option == kAggressiveThreshold) 371 if (option == kAggressiveThreshold)
369 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE; 372 return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE;
370 373
371 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT; 374 return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT;
372 } 375 }
373 376
374 } // namespace switches 377 } // namespace switches
375 } // namespace chromeos 378 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698