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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1250093006: Added memory pressure monitor for linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-upload with less restrictive copy detection. Created 5 years, 5 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 203400ea7757b12c8581abdb4556a2f1bca2f863..fceaeec4cd3d7783e2b6f618e55868140799a8a5 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -128,6 +128,10 @@
#include <glib-object.h>
#endif
+#if defined(OS_LINUX)
+#include "base/memory/memory_pressure_monitor_linux.h"
+#endif
+
#if defined(OS_LINUX) && defined(USE_UDEV)
#include "content/browser/device_monitor_udev.h"
#elif defined(OS_MACOSX) && !defined(OS_IOS)
@@ -664,6 +668,8 @@ int BrowserMainLoop::PreCreateThreads() {
memory_pressure_monitor_.reset(new base::chromeos::MemoryPressureMonitor(
chromeos::switches::GetMemoryPressureThresholds()));
}
+#elif defined(OS_LINUX)
+ memory_pressure_monitor_.reset(new base::nix::MemoryPressureMonitor());
#elif defined(OS_MACOSX) && !defined(OS_IOS)
memory_pressure_monitor_.reset(new base::mac::MemoryPressureMonitor());
#elif defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698