Move prefs::kLastPolicyStatisticsUpdate to the policy component.
[chromium-blink-merge.git] / base / android / sys_utils.cc
blobc23125390dab446885527f5f57b2bf11d692c455
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/android/sys_utils.h"
7 #include "base/sys_info.h"
8 #include "jni/SysUtils_jni.h"
10 const int64 kLowEndMemoryThreshold = 1024 * 1024 * 512; // 512 mb.
12 // Defined and called by JNI
13 static jboolean IsLowEndDevice(JNIEnv* env, jclass clazz) {
14 return base::android::SysUtils::IsLowEndDevice();
17 namespace base {
18 namespace android {
20 bool SysUtils::Register(JNIEnv* env) {
21 return RegisterNativesImpl(env);
24 bool SysUtils::IsLowEndDevice() {
25 return SysInfo::AmountOfPhysicalMemory() <= kLowEndMemoryThreshold;
28 SysUtils::SysUtils() { }
30 } // namespace android
31 } // namespace base