Commit 3613d12
[MemoryPressureListener] Notify listeners when returning to no pressure
Eventually, the memory pressure listeners will be migrated to the
base::MemoryConsumer API.
A major difference is that the base:MemoryConsumer notifications are
stateful. You only get notifications when transitioning from a state to
another.
Memory pressure notifications for MODERATE and CRITICAL state can be
sent repeatedly, while the NONE state never triggers any notifications.
In order to ease the transition, memory pressure notifications will
be modified to be a stateful API.
The first step is to notify when transitioning to the NONE state.
This is a no-op change as all current listeners were modified to ensure they ignore those notifications correctly.
Bug: 462288601
Change-Id: I87ad8fffa0914e7f66b5320a745d708b1929b748
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7168577
Commit-Queue: Patrick Monette <[email protected]>
Reviewed-by: Francois Pierre Doray <[email protected]>
Reviewed-by: Thomas Anderson <[email protected]>
Reviewed-by: Vovo Yang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1550203}
NOKEYCHECK=True
GitOrigin-RevId: d139d7a70867886298ae3826082bb1ebe168746c1 parent 00caf5d commit 3613d12
File tree
2 files changed
+7
-0
lines changed- memory
2 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
0 commit comments