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

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: Uncomment ::Get functionality 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
« no previous file with comments | « base/memory/memory_pressure_monitor_win_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a6b7d6d93bd3e8367bdc1b1635d3f13aa54e9fca 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -98,7 +98,6 @@
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
-#include "base/memory/memory_pressure_monitor_mac.h"
#include "content/browser/bootstrap_sandbox_mac.h"
#include "content/browser/browser_io_surface_manager_mac.h"
#include "content/browser/cocoa/system_hotkey_helper_mac.h"
@@ -112,7 +111,6 @@
#include <commctrl.h>
#include <shellapi.h>
-#include "base/memory/memory_pressure_monitor_win.h"
#include "content/browser/system_message_window_win.h"
#include "content/common/sandbox_win.h"
#include "net/base/winsock_init.h"
@@ -120,7 +118,6 @@
#endif
#if defined(OS_CHROMEOS)
-#include "base/memory/memory_pressure_monitor_chromeos.h"
#include "chromeos/chromeos_switches.h"
#endif
@@ -332,12 +329,12 @@ base::win::MemoryPressureMonitor* CreateWinMemoryPressureMonitor(
base::StringToInt(thresholds[1], &critical_threshold_mb) &&
moderate_threshold_mb >= critical_threshold_mb &&
critical_threshold_mb >= 0) {
- return new base::win::MemoryPressureMonitor(moderate_threshold_mb,
- critical_threshold_mb);
+ return new base::MemoryPressureMonitor(moderate_threshold_mb,
+ critical_threshold_mb);
}
// In absence of valid switches use the automatic defaults.
- return new base::win::MemoryPressureMonitor();
+ return new base::MemoryPressureMonitor();
}
#endif // defined(OS_WIN)
@@ -661,11 +658,11 @@ int BrowserMainLoop::PreCreateThreads() {
// once MemoryPressureMonitor is made a concrete class.
#if defined(OS_CHROMEOS)
if (chromeos::switches::MemoryPressureHandlingEnabled()) {
- memory_pressure_monitor_.reset(new base::chromeos::MemoryPressureMonitor(
+ memory_pressure_monitor_.reset(new base::MemoryPressureMonitor(
chromeos::switches::GetMemoryPressureThresholds()));
}
-#elif defined(OS_MACOSX) && !defined(OS_IOS)
- memory_pressure_monitor_.reset(new base::mac::MemoryPressureMonitor());
+#elif defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
+ memory_pressure_monitor_.reset(new base::MemoryPressureMonitor());
#elif defined(OS_WIN)
memory_pressure_monitor_.reset(CreateWinMemoryPressureMonitor(
parsed_command_line_));
« no previous file with comments | « base/memory/memory_pressure_monitor_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698