Index: content/gpu/gpu_watchdog_thread.cc |
diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc |
index e6da1a4497d59f306f6fd30e03dede5604a05392..6052d41647dd380f4ebd4d19cff67129a1b6de55 100644 |
--- a/content/gpu/gpu_watchdog_thread.cc |
+++ b/content/gpu/gpu_watchdog_thread.cc |
@@ -13,10 +13,8 @@ |
#include "base/command_line.h" |
#include "base/compiler_specific.h" |
#include "base/files/file_util.h" |
-#include "base/location.h" |
#include "base/power_monitor/power_monitor.h" |
#include "base/process/process.h" |
-#include "base/single_thread_task_runner.h" |
#include "build/build_config.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/result_codes.h" |
@@ -77,8 +75,9 @@ GpuWatchdogThread::GpuWatchdogThread(int timeout) |
void GpuWatchdogThread::PostAcknowledge() { |
// Called on the monitored thread. Responds with OnAcknowledge. Cannot use |
// the method factory. Rely on reference counting instead. |
- task_runner()->PostTask(FROM_HERE, |
- base::Bind(&GpuWatchdogThread::OnAcknowledge, this)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&GpuWatchdogThread::OnAcknowledge, this)); |
} |
void GpuWatchdogThread::CheckArmed() { |
@@ -163,9 +162,10 @@ void GpuWatchdogThread::OnAcknowledge() { |
bool was_suspended = (base::Time::Now() > suspension_timeout_); |
// The monitored thread has responded. Post a task to check it again. |
- task_runner()->PostDelayedTask( |
- FROM_HERE, base::Bind(&GpuWatchdogThread::OnCheck, |
- weak_factory_.GetWeakPtr(), was_suspended), |
+ message_loop()->PostDelayedTask( |
+ FROM_HERE, |
+ base::Bind(&GpuWatchdogThread::OnCheck, weak_factory_.GetWeakPtr(), |
+ was_suspended), |
0.5 * timeout_); |
} |
@@ -194,12 +194,13 @@ void GpuWatchdogThread::OnCheck(bool after_suspend) { |
// Post a task to the monitored thread that does nothing but wake up the |
// TaskObserver. Any other tasks that are pending on the watched thread will |
// also wake up the observer. This simply ensures there is at least one. |
- watched_message_loop_->task_runner()->PostTask(FROM_HERE, |
- base::Bind(&base::DoNothing)); |
+ watched_message_loop_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&base::DoNothing)); |
// Post a task to the watchdog thread to exit if the monitored thread does |
// not respond in time. |
- task_runner()->PostDelayedTask( |
+ message_loop()->PostDelayedTask( |
FROM_HERE, |
base::Bind(&GpuWatchdogThread::DeliberatelyTerminateToRecoverFromHang, |
weak_factory_.GetWeakPtr()), |
@@ -340,8 +341,9 @@ bool GpuWatchdogThread::MatchXEventAtom(XEvent* event) { |
#endif |
void GpuWatchdogThread::AddPowerObserver() { |
- task_runner()->PostTask( |
- FROM_HERE, base::Bind(&GpuWatchdogThread::OnAddPowerObserver, this)); |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&GpuWatchdogThread::OnAddPowerObserver, this)); |
} |
void GpuWatchdogThread::OnAddPowerObserver() { |