Index: device/wake_lock/wake_lock_service_impl.cc |
diff --git a/device/wake_lock/wake_lock_service_impl.cc b/device/wake_lock/wake_lock_service_impl.cc |
index 34bcca251d4815be1162b28302ced742dc0ef882..ae998aa62f4e27a29e65b60d5c0d3b5eb1c6c026 100644 |
--- a/device/wake_lock/wake_lock_service_impl.cc |
+++ b/device/wake_lock/wake_lock_service_impl.cc |
@@ -10,8 +10,7 @@ |
namespace device { |
-WakeLockServiceImpl::WakeLockServiceImpl( |
- base::WeakPtr<WakeLockServiceContext> context) |
+WakeLockServiceImpl::WakeLockServiceImpl(WakeLockServiceContext* context) |
: context_(context), wake_lock_request_outstanding_(false) {} |
WakeLockServiceImpl::~WakeLockServiceImpl() { |
@@ -19,7 +18,7 @@ WakeLockServiceImpl::~WakeLockServiceImpl() { |
} |
void WakeLockServiceImpl::RequestWakeLock() { |
- if (!context_ || wake_lock_request_outstanding_) |
+ if (wake_lock_request_outstanding_) |
return; |
wake_lock_request_outstanding_ = true; |
@@ -27,7 +26,7 @@ void WakeLockServiceImpl::RequestWakeLock() { |
} |
void WakeLockServiceImpl::CancelWakeLock() { |
- if (!context_ || !wake_lock_request_outstanding_) |
+ if (!wake_lock_request_outstanding_) |
return; |
wake_lock_request_outstanding_ = false; |