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

Unified Diff: content/child/memory/child_memory_message_filter.cc

Issue 1362233003: Add architecture for simulating memory pressure notifications in all processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nasko's comments Created 5 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 | « content/child/memory/child_memory_message_filter.h ('k') | content/common/memory_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9306e7cd9e875e99888d62fae89e9660cdc975e7 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,9 @@ void ChildMemoryMessageFilter::OnSetPressureNotificationsSuppressed(
base::MemoryPressureListener::SetNotificationsSuppressed(suppressed);
}
+void ChildMemoryMessageFilter::OnSimulatePressureNotification(
+ base::MemoryPressureListener::MemoryPressureLevel level) {
+ base::MemoryPressureListener::SimulatePressureNotification(level);
+}
+
} // namespace content
« no previous file with comments | « content/child/memory/child_memory_message_filter.h ('k') | content/common/memory_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698