Chromium Code Reviews| Index: base/android/java/src/org/chromium/base/SysUtils.java |
| diff --git a/base/android/java/src/org/chromium/base/SysUtils.java b/base/android/java/src/org/chromium/base/SysUtils.java |
| index eabef61c9e18469f7417d9e52c60a0e90773fb03..1c8378c1255dfe7dbe836e1f84e01ac0e1a88864 100644 |
| --- a/base/android/java/src/org/chromium/base/SysUtils.java |
| +++ b/base/android/java/src/org/chromium/base/SysUtils.java |
| @@ -103,13 +103,12 @@ public class SysUtils { |
| } |
| private static boolean detectLowEndDevice() { |
| - if (CommandLine.isInitialized()) { |
| - if (CommandLine.getInstance().hasSwitch(BaseSwitches.LOW_END_DEVICE_MODE)) { |
| - int mode = Integer.parseInt(CommandLine.getInstance().getSwitchValue( |
| - BaseSwitches.LOW_END_DEVICE_MODE)); |
| - if (mode == 1) return true; |
| - if (mode == 0) return false; |
| - } |
| + assert CommandLine.isInitialized(); |
|
nyquist
2014/10/23 22:30:48
How does this work for the ChildProcessLauncher?
Feng Qian
2014/10/23 22:57:26
ChildProcessLauncher is called in browser process
nyquist
2014/10/24 18:14:42
The class is initialized whenever:
- An instance
Feng Qian
2014/10/27 16:09:16
Yes, that's intended, we want to catch all cases w
|
| + if (CommandLine.getInstance().hasSwitch(BaseSwitches.LOW_END_DEVICE_MODE)) { |
| + int mode = Integer.parseInt(CommandLine.getInstance().getSwitchValue( |
| + BaseSwitches.LOW_END_DEVICE_MODE)); |
| + if (mode == 1) return true; |
| + if (mode == 0) return false; |
| } |
| if (Build.VERSION.SDK_INT <= ANDROID_LOW_MEMORY_ANDROID_SDK_THRESHOLD) { |