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

Unified Diff: components/history/core/browser/history_database.h

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
Index: components/history/core/browser/history_database.h
diff --git a/components/history/core/browser/history_database.h b/components/history/core/browser/history_database.h
index 0eb74a571afab422235df12a447b0039371290e6..6e7a8140a607a24d7de9f3659950ac7578291a4c 100644
--- a/components/history/core/browser/history_database.h
+++ b/components/history/core/browser/history_database.h
@@ -16,6 +16,7 @@
#include "components/history/core/browser/url_database.h"
#include "components/history/core/browser/visit_database.h"
#include "components/history/core/browser/visitsegment_database.h"
+#include "components/memory_coordinator/common/memory_coordinator_client.h"
#include "sql/connection.h"
#include "sql/init_status.h"
#include "sql/meta_table.h"
@@ -142,6 +143,9 @@ class HistoryDatabase : public DownloadDatabase,
// true try to trim all unused cache, otherwise trim by half.
void TrimMemory(bool aggressively);
+ // Adjusts the cache memory used by the database.
+ void AdjustCacheMemory(memory_coordinator::MemoryState state);
+
// Razes the database. Returns true if successful.
bool Raze();

Powered by Google App Engine
This is Rietveld 408576698