Index: content/gpu/gpu_watchdog_thread.cc |
diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc |
index 940d07e72ac43ae0cb6f36e1b160ab48c6bd7f24..5f8f6197f6db178e34f1b162dfd6e0d32eaf0fc9 100644 |
--- a/content/gpu/gpu_watchdog_thread.cc |
+++ b/content/gpu/gpu_watchdog_thread.cc |
@@ -114,9 +114,7 @@ GpuWatchdogThread::~GpuWatchdogThread() { |
CloseHandle(watched_thread_handle_); |
#endif |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- if (power_monitor) |
- power_monitor->RemoveObserver(this); |
+ base::PowerMonitor::RemoveObserver(this); |
#if defined(OS_CHROMEOS) |
if (tty_file_) |
@@ -266,9 +264,7 @@ void GpuWatchdogThread::AddPowerObserver() { |
} |
void GpuWatchdogThread::OnAddPowerObserver() { |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- DCHECK(power_monitor); |
- power_monitor->AddObserver(this); |
+ DCHECK(base::PowerMonitor::AddObserver(this)); |
} |
void GpuWatchdogThread::OnSuspend() { |