sys_utils.h 735 B

1234567891011121314151617181920212223242526
  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.
  4. #ifndef BASE_ANDROID_SYS_UTILS_H_
  5. #define BASE_ANDROID_SYS_UTILS_H_
  6. #include "base/android/jni_android.h"
  7. namespace base {
  8. namespace android {
  9. class BASE_EXPORT SysUtils {
  10. public:
  11. // Returns true iff this is a low-end device.
  12. static bool IsLowEndDeviceFromJni();
  13. // Returns true if system has low available memory.
  14. static bool IsCurrentlyLowMemory();
  15. // Returns amount of physical ram detected in KB, or 0 if detection failed.
  16. static int AmountOfPhysicalMemoryKB();
  17. };
  18. } // namespace android
  19. } // namespace base
  20. #endif // BASE_ANDROID_SYS_UTILS_H_