Chromium Code Reviews| Index: content/child/memory/child_memory_message_filter.cc |
| diff --git a/content/child/memory/child_memory_message_filter.cc b/content/child/memory/child_memory_message_filter.cc |
| index 1f3515997714eee9fb3e9146f31adbcd6b645288..23e77b6fb25183d3ee13eaccee5661371c941229 100644 |
| --- a/content/child/memory/child_memory_message_filter.cc |
| +++ b/content/child/memory/child_memory_message_filter.cc |
| @@ -4,7 +4,6 @@ |
| #include "content/child/memory/child_memory_message_filter.h" |
| -#include "base/memory/memory_pressure_listener.h" |
| #include "content/common/memory_messages.h" |
| namespace content { |
| @@ -18,6 +17,8 @@ bool ChildMemoryMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| IPC_BEGIN_MESSAGE_MAP(ChildMemoryMessageFilter, message) |
| IPC_MESSAGE_HANDLER(MemoryMsg_SetPressureNotificationsSuppressed, |
| OnSetPressureNotificationsSuppressed) |
| + IPC_MESSAGE_HANDLER(MemoryMsg_SimulatePressureNotification, |
| + OnSimulatePressureNotification) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |
| @@ -29,4 +30,10 @@ void ChildMemoryMessageFilter::OnSetPressureNotificationsSuppressed( |
| base::MemoryPressureListener::SetNotificationsSuppressed(suppressed); |
| } |
| +void ChildMemoryMessageFilter::OnSimulatePressureNotification( |
| + base::MemoryPressureListener::MemoryPressureLevel level) { |
| + // Simulate a memory pressure notification in the child process. |
|
nasko
2015/09/30 16:44:58
Redundant comment. It is pretty clear by the actua
petrcermak
2015/09/30 18:18:36
Done.
|
| + base::MemoryPressureListener::SimulatePressureNotification(level); |
| +} |
| + |
| } // namespace content |