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

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

Issue 2882513004: Remove renderer notifications of memory pressure. (Closed)
Patch Set: Merge Created 3 years, 7 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/BUILD.gn » ('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
deleted file mode 100644
index 91e6849eab2eb2aea5d157e6ef42ee85aa0ce031..0000000000000000000000000000000000000000
--- a/content/child/memory/child_memory_message_filter.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/child/memory/child_memory_message_filter.h"
-
-#include "content/common/memory_messages.h"
-
-namespace content {
-
-ChildMemoryMessageFilter::ChildMemoryMessageFilter() {}
-
-ChildMemoryMessageFilter::~ChildMemoryMessageFilter() {}
-
-bool ChildMemoryMessageFilter::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ChildMemoryMessageFilter, message)
- IPC_MESSAGE_HANDLER(MemoryMsg_SetPressureNotificationsSuppressed,
- OnSetPressureNotificationsSuppressed)
- IPC_MESSAGE_HANDLER(MemoryMsg_SimulatePressureNotification,
- OnSimulatePressureNotification)
- IPC_MESSAGE_HANDLER(MemoryMsg_PressureNotification, OnPressureNotification)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-void ChildMemoryMessageFilter::OnSetPressureNotificationsSuppressed(
- bool suppressed) {
- // Enable/disable suppressing memory notifications in the child process.
- base::MemoryPressureListener::SetNotificationsSuppressed(suppressed);
-}
-
-void ChildMemoryMessageFilter::OnSimulatePressureNotification(
- base::MemoryPressureListener::MemoryPressureLevel level) {
- // Pass the message to SimulatePressureNotification. This will emit the
- // message to all listeners even if notifications are suppressed.
- base::MemoryPressureListener::SimulatePressureNotification(level);
-}
-
-void ChildMemoryMessageFilter::OnPressureNotification(
- base::MemoryPressureListener::MemoryPressureLevel level) {
- // Forward the message along the normal notification path. If notifications
- // are suppressed then the notification will be swallowed.
- base::MemoryPressureListener::NotifyMemoryPressure(level);
-}
-
-} // namespace content
« no previous file with comments | « content/child/memory/child_memory_message_filter.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698