| 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..df719ea575f6761a08374146a891ac28dd84b9d3 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_));
|
| @@ -917,9 +919,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
| resource_dispatcher_host_.get()->Shutdown();
|
| }
|
|
|
| -#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
|
| memory_pressure_monitor_.reset();
|
| -#endif
|
|
|
| #if defined(OS_MACOSX)
|
| BrowserCompositorMac::DisableRecyclingForShutdown();
|
|
|