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

Unified Diff: base/chromeos/memory_pressure_monitor_chromeos.cc

Issue 1100773004: base: Remove most uses of MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing includes. Created 5 years, 8 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/cancelable_callback_unittest.cc ('k') | base/critical_closure.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/chromeos/memory_pressure_monitor_chromeos.cc
diff --git a/base/chromeos/memory_pressure_monitor_chromeos.cc b/base/chromeos/memory_pressure_monitor_chromeos.cc
index 404c515c8040edb399c6b3715c6b8306a8fc47be..82bc6a19abd806cdba84404e36da91ecf230c70d 100644
--- a/base/chromeos/memory_pressure_monitor_chromeos.cc
+++ b/base/chromeos/memory_pressure_monitor_chromeos.cc
@@ -7,10 +7,11 @@
#include <fcntl.h>
#include <sys/select.h>
-#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/process_metrics.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
namespace base {
@@ -120,10 +121,9 @@ MemoryPressureMonitorChromeOS::~MemoryPressureMonitorChromeOS() {
}
void MemoryPressureMonitorChromeOS::ScheduleEarlyCheck() {
- MessageLoop::current()->PostTask(
- FROM_HERE,
- Bind(&MemoryPressureMonitorChromeOS::CheckMemoryPressure,
- weak_ptr_factory_.GetWeakPtr()));
+ ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, Bind(&MemoryPressureMonitorChromeOS::CheckMemoryPressure,
+ weak_ptr_factory_.GetWeakPtr()));
}
MemoryPressureListener::MemoryPressureLevel
« no previous file with comments | « base/cancelable_callback_unittest.cc ('k') | base/critical_closure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698