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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl.cc

Issue 2015473002: Fix purging logic for dom_storage caches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: content/browser/dom_storage/dom_storage_context_impl.cc
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc
index 9f121cdf9f413dbd348a2010669cc946f002e5e0..c1fc1db24f079b0e85cbd10020e0a1943f0b3879 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl.cc
@@ -443,9 +443,9 @@ void DOMStorageContextImpl::PurgeMemory(PurgeOption purge_option) {
// size since it can be expensive trying to estimate the sqlite usage for
// all databases. For low end devices purge all inactive areas.
bool should_purge =
- (is_low_end_device_ && initial_stats.inactive_area_count) ||
- initial_stats.total_cache_size > kMaxCacheSize ||
- initial_stats.total_area_count > kMaxStorageAreaCount;
+ initial_stats.inactive_area_count &&
+ (is_low_end_device_ || initial_stats.total_cache_size > kMaxCacheSize ||
+ initial_stats.total_area_count > kMaxStorageAreaCount);
if (!should_purge)
return;
« 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