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

Unified Diff: device/wake_lock/wake_lock_service_impl.cc

Issue 2734943003: Device Service: Decouple Wake Lock from //content (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « device/wake_lock/wake_lock_service_impl.h ('k') | services/device/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « device/wake_lock/wake_lock_service_impl.h ('k') | services/device/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698