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

Side by Side Diff: content/child/memory/child_memory_message_filter.cc

Issue 1332583002: Architecture for cross-process memory notification suppressing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment explaining the use of scoped_ptr in the browser test matcher Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/child/memory/child_memory_message_filter.h"
6
7 #include "base/memory/memory_pressure_listener.h"
8 #include "content/common/memory_messages.h"
9
10 namespace content {
11
12 ChildMemoryMessageFilter::ChildMemoryMessageFilter() {}
13
14 ChildMemoryMessageFilter::~ChildMemoryMessageFilter() {}
15
16 bool ChildMemoryMessageFilter::OnMessageReceived(const IPC::Message& message) {
17 bool handled = true;
18 IPC_BEGIN_MESSAGE_MAP(ChildMemoryMessageFilter, message)
19 IPC_MESSAGE_HANDLER(MemoryMsg_SetPressureNotificationsSuppressed,
20 OnSetPressureNotificationsSuppressed)
21 IPC_MESSAGE_UNHANDLED(handled = false)
22 IPC_END_MESSAGE_MAP()
23 return handled;
24 }
25
26 void ChildMemoryMessageFilter::OnSetPressureNotificationsSuppressed(
27 bool suppressed) {
28 // Enable/disable suppressing memory notifications in the child process.
29 base::MemoryPressureListener::SetNotificationsSuppressed(suppressed);
30 }
31
32 } // namespace content
OLDNEW
« no previous file with comments | « content/child/memory/child_memory_message_filter.h ('k') | content/common/content_message_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698