| Index: components/history/core/browser/history_backend.h
|
| diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
|
| index aeecc96ab01663b118f0bcafaa8501c00f830d13..64c2b62c9ec1530251dad47710acc1763c947fdb 100644
|
| --- a/components/history/core/browser/history_backend.h
|
| +++ b/components/history/core/browser/history_backend.h
|
| @@ -32,6 +32,7 @@
|
| #include "components/history/core/browser/keyword_id.h"
|
| #include "components/history/core/browser/thumbnail_database.h"
|
| #include "components/history/core/browser/visit_tracker.h"
|
| +#include "components/memory_coordinator/common/memory_coordinator_client.h"
|
| #include "sql/init_status.h"
|
|
|
| class HistoryURLProvider;
|
| @@ -102,7 +103,8 @@ class QueuedHistoryDBTask {
|
| // functions in the history service. These functions are not documented
|
| // here, see the history service for behavior.
|
| class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| - public HistoryBackendNotifier {
|
| + public HistoryBackendNotifier,
|
| + public memory_coordinator::MemoryCoordinatorClient {
|
| public:
|
| // Interface implemented by the owner of the HistoryBackend object. Normally,
|
| // the history service implements this to send stuff back to the main thread.
|
| @@ -478,6 +480,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
|
|
| base::Time GetFirstRecordedTimeForTest() { return first_recorded_time_; }
|
|
|
| + // memory_coordinator::MemoryCoordinatorClient implementation:
|
| + void OnMemoryStateChange(memory_coordinator::MemoryState state) override;
|
| +
|
| protected:
|
| ~HistoryBackend() override;
|
|
|
| @@ -579,6 +584,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| // Does the work of Init.
|
| void InitImpl(const HistoryDatabaseParams& history_database_params);
|
|
|
| + // Asks database to trim memory.
|
| + void TrimMemory(bool trim_aggressively);
|
| +
|
| // Called when the system is under memory pressure.
|
| void OnMemoryPressure(
|
| base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
|
|
|