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

Unified Diff: base/sys_info.cc

Issue 1117193004: Enable low end device mode when the client is assigned to one of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info.cc
diff --git a/base/sys_info.cc b/base/sys_info.cc
index 72a9944b9729ac4e9e9443fb4a79045bde801cf0..8640dc14edcfc01e94c3123b3055a003bc9bc4a1 100644
--- a/base/sys_info.cc
+++ b/base/sys_info.cc
@@ -7,7 +7,9 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
+#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
#include "base/sys_info_internal.h"
#include "base/time/time.h"
@@ -34,6 +36,14 @@ static LazyInstance<
// static
bool SysInfo::IsLowEndDevice() {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("MemoryReduction");
+
+ // Low End Device Mode will be enabled if this client is assigned to
+ // one of those EnabledXXX groups.
+ if (StartsWithASCII(group_name, "Enabled", true))
+ return true;
+
return g_lazy_low_end_device.Get().value();
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698