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

Unified Diff: chrome/browser/renderer_host/web_cache_manager.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 | « chrome/browser/prerender/prerender_manager_factory.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/web_cache_manager.cc
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index e4c7a58495909819f6d1dcec765f5b21991b1411..a61a2c3eaaafc35043c5d938b1e5057d895b1fe5 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -23,10 +23,6 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
-#if defined(OS_ANDROID)
-#include "base/android/sys_utils.h"
-#endif
-
using base::Time;
using base::TimeDelta;
using blink::WebCache;
@@ -326,12 +322,10 @@ void WebCacheManager::EnactStrategy(const AllocationStrategy& strategy) {
// We allow the dead objects to consume up to half of the cache capacity.
size_t max_dead_capacity = capacity / 2;
-#if defined(OS_ANDROID)
- if (base::android::SysUtils::IsLowEndDevice())
+ if (base::SysInfo::IsLowEndDevice()) {
max_dead_capacity = std::min(static_cast<size_t>(512 * 1024),
max_dead_capacity);
-#endif
-
+ }
host->Send(new ChromeViewMsg_SetCacheCapacities(min_dead_capacity,
max_dead_capacity,
capacity));
« no previous file with comments | « chrome/browser/prerender/prerender_manager_factory.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698