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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1124163003: Rename OS-specific MemoryPressureMonitor implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index a7178dbb2bc5061138458029550860e730499d01..80645df7ba154c534ba71bbe6d2d69b2418f1b6c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -91,7 +91,7 @@
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
-#include "base/mac/memory_pressure_monitor_mac.h"
+#include "base/mac/memory_pressure_monitor.h"
#include "content/browser/bootstrap_sandbox_mac.h"
#include "content/browser/cocoa/system_hotkey_helper_mac.h"
#include "content/browser/compositor/browser_compositor_view_mac.h"
@@ -111,7 +111,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "base/chromeos/memory_pressure_monitor_chromeos.h"
+#include "base/chromeos/memory_pressure_monitor.h"
#include "chromeos/chromeos_switches.h"
#endif
@@ -644,13 +644,15 @@ int BrowserMainLoop::PreCreateThreads() {
result_code_ = parts_->PreCreateThreads();
}
+ // TODO(chrisha): Abstract away this construction mess to a helper function,
+ // once MemoryPressureMonitor is made a concrete class.
#if defined(OS_CHROMEOS)
if (chromeos::switches::MemoryPressureHandlingEnabled()) {
- memory_pressure_monitor_.reset(new base::MemoryPressureMonitorChromeOS(
+ memory_pressure_monitor_.reset(new base::chromeos::MemoryPressureMonitor(
chromeos::switches::GetMemoryPressureThresholds()));
}
#elif defined(OS_MACOSX) && !defined(OS_IOS)
- memory_pressure_monitor_.reset(new base::MemoryPressureMonitorMac());
+ memory_pressure_monitor_.reset(new base::mac::MemoryPressureMonitor());
#elif defined(OS_WIN)
memory_pressure_monitor_.reset(CreateWinMemoryPressureMonitor(
parsed_command_line_));
« base/chromeos/memory_pressure_monitor.h ('K') | « base/memory/memory_pressure_monitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698