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

Unified Diff: base/sys_info.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/memory_pressure_listener.cc ('k') | base/tuple.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info.cc
diff --git a/base/sys_info.cc b/base/sys_info.cc
index cb93480b9793ecde36dd33d447d17b35accc016c..72a9944b9729ac4e9e9443fb4a79045bde801cf0 100644
--- a/base/sys_info.cc
+++ b/base/sys_info.cc
@@ -19,15 +19,9 @@ static const int kLowMemoryDeviceThresholdMB = 512;
bool DetectLowEndDevice() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
- int int_value = 0;
- if (command_line->HasSwitch(switches::kLowEndDeviceMode)) {
- std::string string_value =
- command_line->GetSwitchValueASCII(switches::kLowEndDeviceMode);
- StringToInt(string_value, &int_value);
- }
- if (int_value == 1)
+ if (command_line->HasSwitch(switches::kEnableLowEndDeviceMode))
return true;
- if (int_value != 2)
+ if (command_line->HasSwitch(switches::kDisableLowEndDeviceMode))
return false;
int ram_size_mb = SysInfo::AmountOfPhysicalMemoryMB();
« no previous file with comments | « base/memory/memory_pressure_listener.cc ('k') | base/tuple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698