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

Unified Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 1045433002: Migrate ChromeOS to base::MemoryPressureMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup/fixes Created 5 years, 9 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: chrome/browser/browser_process_platform_part_chromeos.cc
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 12d6ce6a97ccb52be49e23d9f53251945b1fb68a..8030f885c3ea571b4a04c74b62144433d0b2fbb5 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -22,6 +22,8 @@
#include "chrome/browser/chromeos/system/timezone_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/memory_pressure_monitor_chromeos.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/geolocation/simple_geolocation_provider.h"
#include "chromeos/timezone/timezone_resolver.h"
#include "components/session_manager/core/session_manager.h"
@@ -95,8 +97,13 @@ session_manager::SessionManager* BrowserProcessPlatformPart::SessionManager() {
chromeos::OomPriorityManager*
BrowserProcessPlatformPart::oom_priority_manager() {
DCHECK(CalledOnValidThread());
- if (!oom_priority_manager_.get())
+ if (!oom_priority_manager_.get()) {
Mr4D (OOO till 08-26) 2015/03/31 21:12:17 I suppose this is temporary? Also - I am not sure
+ if (chromeos::switches::MemoryPressureHandlingEnabled()) {
Mr4D (OOO till 08-26) 2015/03/31 21:12:17 What was the reason for not instantiating it with
+ memory_pressure_monitor_.reset(new MemoryPressureMonitorChromeOS(
+ chromeos::switches::GetMemoryPressureThresholds()));
+ }
oom_priority_manager_.reset(new chromeos::OomPriorityManager());
+ }
return oom_priority_manager_.get();
}
« no previous file with comments | « chrome/browser/browser_process_platform_part_chromeos.h ('k') | chrome/browser/chromeos/memory/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698