summaryrefslogtreecommitdiffstats
path: root/base/android/sys_utils.h
diff options
context:
space:
mode:
authordigit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 01:04:57 +0000
committerdigit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 01:04:57 +0000
commit095e4dc9888210cb153f712830e7f07e8c9c9a51 (patch)
tree8524937dae2c4ce3986362f1cb28d455ec356c42 /base/android/sys_utils.h
parentf0ad54cdb589d9054b86f49872d338b682ba590d (diff)
downloadchromium_src-095e4dc9888210cb153f712830e7f07e8c9c9a51.zip
chromium_src-095e4dc9888210cb153f712830e7f07e8c9c9a51.tar.gz
chromium_src-095e4dc9888210cb153f712830e7f07e8c9c9a51.tar.bz2
android: Make org.chromium.base.SysUtils.isLowEndDevice() work without native code.
This patch modifies the implementation if SysUtils.isLowEndDevice() to not rely on any native code, which is required to run it before the native libraries are actually loaded (e.g. when running certain tests). + Simplify the content linker that doesn't need a specific native method anymore to replicate the yet-unloaded native SysUtils::IsLowEndDevice(). BUG=309926 R=dtrainor@chromium.org,tedchoc@chromium.org,frankf@chromium.org,bulach@chromium.org TEST=build/android/test_runner.py linker Review URL: https://codereview.chromium.org/59033008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/sys_utils.h')
-rw-r--r--base/android/sys_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/android/sys_utils.h b/base/android/sys_utils.h
index 78122ff..318c75e 100644
--- a/base/android/sys_utils.h
+++ b/base/android/sys_utils.h
@@ -14,8 +14,12 @@ class BASE_EXPORT SysUtils {
public:
static bool Register(JNIEnv* env);
+ // Returns true iff this is a low-end device.
static bool IsLowEndDevice();
+ // Return the device's RAM size in kilo-bytes. Used for testing.
+ static size_t AmountOfPhysicalMemoryKB();
+
private:
SysUtils();
};