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

Unified Diff: content/browser/browser_main_loop.cc

Issue 2943953002: Don't disable MemoryPressureListener when MemoryCoordinator is enabled (Closed)
Patch Set: Fix comment Created 3 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 1f4346df4788cb5020b44f51e6535f488af0e899..7256cd46d3843937cdd76bcdcc98e0327ffadf64 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -817,9 +817,6 @@ int BrowserMainLoop::PreCreateThreads() {
InitializeMemoryManagementComponent();
- if (base::FeatureList::IsEnabled(features::kMemoryCoordinator))
- MemoryCoordinatorImpl::GetInstance()->Start();
-
#if defined(OS_MACOSX)
if (base::CommandLine::InitializedForCurrentProcess() &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -1604,16 +1601,8 @@ void BrowserMainLoop::InitializeMemoryManagementComponent() {
CreateWinMemoryPressureMonitor(parsed_command_line_);
#endif
- if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
- // Disable MemoryPressureListener when memory coordinator is enabled.
- base::MemoryPressureListener::SetNotificationsSuppressed(true);
- auto* coordinator = MemoryCoordinatorImpl::GetInstance();
- if (memory_pressure_monitor_) {
- memory_pressure_monitor_->SetDispatchCallback(
- base::Bind(&MemoryCoordinatorImpl::RecordMemoryPressure,
- base::Unretained(coordinator)));
- }
- }
+ if (base::FeatureList::IsEnabled(features::kMemoryCoordinator))
+ MemoryCoordinatorImpl::GetInstance()->Start();
auto* swap_metrics_observer = SwapMetricsObserver::GetInstance();
if (swap_metrics_observer)
« no previous file with comments | « chrome/browser/resource_coordinator/tab_manager.cc ('k') | content/browser/memory/memory_coordinator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698