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

Unified Diff: chrome/browser/renderer_host/web_cache_manager.cc

Issue 119493005: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Put low end device detection under the flag for all platforms except android. Created 6 years, 11 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
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 274bb461a9c8550a5fbee6b8e537915e91ec3545..aa94059a64d06b9c14c64dd729fb2844063204dc 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -14,6 +14,7 @@
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/sys_info.h"
+#include "base/sys_utils.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -23,10 +24,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;
@@ -327,7 +324,7 @@ 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::SysUtils::IsLowEndDevice())
max_dead_capacity = std::min(512 * 1024U, max_dead_capacity);
#endif

Powered by Google App Engine
This is Rietveld 408576698