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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 6 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
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 8c90372bed2931a50d01a8404fec70de81c6e0ff..a3464fa824e6ff05dadc25095f0625bc4323b3c1 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -36,6 +36,7 @@
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
+#include "components/memory_coordinator/browser/memory_state_notifier.h"
#include "components/tracing/browser/trace_config_file.h"
#include "components/tracing/common/process_metrics_memory_dump_provider.h"
#include "components/tracing/common/trace_to_console.h"
@@ -678,6 +679,11 @@ void BrowserMainLoop::PostMainMessageLoopStart() {
DOMStorageArea::EnableAggressiveCommitDelay();
}
+ if (parsed_command_line_.HasSwitch(
+ switches::kEnableMemoryCoordinator)) {
+ memory_state_notifier_.reset(new memory_coordinator::MemoryStateNotifier);
+ }
+
// Enable memory-infra dump providers.
InitSkiaEventTracer();
tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
@@ -996,6 +1002,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
}
memory_pressure_monitor_.reset();
+ memory_state_notifier_.reset();
#if defined(OS_MACOSX)
BrowserCompositorMac::DisableRecyclingForShutdown();

Powered by Google App Engine
This is Rietveld 408576698