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

Unified Diff: components/history/core/browser/history_backend.cc

Issue 2297243004: [WIP] histroy: Adjust cache size OnMemoryStateChange() (Closed)
Patch Set: Created 4 years, 3 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 | components/history/core/browser/history_database.h » ('j') | sql/connection.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index 210032aa2e32b67bb2a7d242047edbda4f38e9c7..a0ffd4c131cd616ac1a5bca4182865a0ce1fad5b 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -921,8 +921,8 @@ bool HistoryBackend::IsExpiredVisitTime(const base::Time& time) {
void HistoryBackend::OnMemoryStateChange(
memory_coordinator::MemoryState state) {
- bool trim_aggressively = state == memory_coordinator::MemoryState::SUSPENDED;
- TrimMemory(trim_aggressively);
+ db_->AdjustCacheMemory(state);
+ // TODO(bashi): Adjust cache memory of |thumbnail_db_| as well.
}
void HistoryBackend::SetPageTitle(const GURL& url,
« no previous file with comments | « no previous file | components/history/core/browser/history_database.h » ('j') | sql/connection.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698