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

Unified Diff: base/memory/discardable_memory_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/base_switches.cc ('k') | base/sys_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_android.cc
diff --git a/base/memory/discardable_memory_android.cc b/base/memory/discardable_memory_android.cc
index c3de3a36b3d9bac3fa8d035dd7eb8fad7891c400..3215969fef5d1ab3764625244fd3eec007092615 100644
--- a/base/memory/discardable_memory_android.cc
+++ b/base/memory/discardable_memory_android.cc
@@ -4,7 +4,6 @@
#include "base/memory/discardable_memory.h"
-#include "base/android/sys_utils.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
@@ -13,6 +12,7 @@
#include "base/memory/discardable_memory_ashmem_allocator.h"
#include "base/memory/discardable_memory_emulated.h"
#include "base/memory/discardable_memory_malloc.h"
+#include "base/sys_info.h"
namespace base {
namespace {
@@ -26,7 +26,7 @@ const size_t kAshmemMemoryLimit = 512 * 1024 * 1024;
size_t GetOptimalAshmemRegionSizeForAllocator() {
// Note that this may do some I/O (without hitting the disk though) so it
// should not be called on the critical path.
- return base::android::SysUtils::AmountOfPhysicalMemoryKB() * 1024 / 8;
+ return base::SysInfo::AmountOfPhysicalMemory() / 8;
}
// Holds the shared state used for allocations.
« no previous file with comments | « base/base_switches.cc ('k') | base/sys_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698