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

Unified Diff: base/sys_info_android.cc

Issue 258663002: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments. Created 6 years, 6 months 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/sys_info.cc ('k') | chrome/browser/android/chrome_startup_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_android.cc
diff --git a/base/sys_info_android.cc b/base/sys_info_android.cc
index 12da23b2878e329b54615857b4a91681bc0a1105..ab7c05d7c6f00686baac50e539256f95a728ff92 100644
--- a/base/sys_info_android.cc
+++ b/base/sys_info_android.cc
@@ -6,10 +6,13 @@
#include <sys/system_properties.h>
+#include "base/android/sys_utils.h"
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/stringprintf.h"
+#include "base/sys_info_internal.h"
namespace {
@@ -162,5 +165,14 @@ int SysInfo::DalvikHeapGrowthLimitMB() {
return heap_growth_limit;
}
+static base::LazyInstance<
+ base::internal::LazySysInfoValue<bool,
+ android::SysUtils::IsLowEndDeviceFromJni> >::Leaky
+ g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
+
+bool SysInfo::IsLowEndDevice() {
+ return g_lazy_low_end_device.Get().value();
+}
+
} // namespace base
« no previous file with comments | « base/sys_info.cc ('k') | chrome/browser/android/chrome_startup_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698