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

Unified Diff: content/browser/devtools/protocol/memory_handler.cc

Issue 2411423004: Disable MemoryPressureListener when memory coordinator is enabled (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/memory_handler.cc
diff --git a/content/browser/devtools/protocol/memory_handler.cc b/content/browser/devtools/protocol/memory_handler.cc
index 9107fa93a4fd5bb38f5b3ad627bab73e3d462a86..2670642779ee712edebaecd114b41c4765d5387e 100644
--- a/content/browser/devtools/protocol/memory_handler.cc
+++ b/content/browser/devtools/protocol/memory_handler.cc
@@ -7,6 +7,7 @@
#include "base/memory/memory_pressure_listener.h"
#include "base/strings/stringprintf.h"
#include "content/browser/memory/memory_pressure_controller_impl.h"
+#include "content/public/common/content_features.h"
namespace content {
namespace devtools {
@@ -18,6 +19,11 @@ MemoryHandler::~MemoryHandler() {}
MemoryHandler::Response MemoryHandler::SetPressureNotificationsSuppressed(
bool suppressed) {
+ if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
+ return Response::InvalidParams(
+ "Cannot enable/disable notifications when memory coordinator is "
+ "enabled");
+ }
content::MemoryPressureControllerImpl::GetInstance()
->SetPressureNotificationsSuppressedInAllProcesses(suppressed);
return Response::OK();
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698