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

Unified Diff: device/wake_lock/wake_lock_service_impl.h

Issue 2734943003: Device Service: Decouple Wake Lock from //content (Closed)
Patch Set: Response to review + 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
Index: device/wake_lock/wake_lock_service_impl.h
diff --git a/device/wake_lock/wake_lock_service_impl.h b/device/wake_lock/wake_lock_service_impl.h
index 87a9b004b163fa5e7517c66c7eb38d394bb7891b..c66ec8d1a8fe73c2f111791f007c6f6afb35eafa 100644
--- a/device/wake_lock/wake_lock_service_impl.h
+++ b/device/wake_lock/wake_lock_service_impl.h
@@ -6,7 +6,6 @@
#define DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_IMPL_H_
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
#include "device/wake_lock/public/interfaces/wake_lock_service.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -16,7 +15,7 @@ class WakeLockServiceContext;
class WakeLockServiceImpl : public mojom::WakeLockService {
public:
- explicit WakeLockServiceImpl(base::WeakPtr<WakeLockServiceContext> context);
+ explicit WakeLockServiceImpl(WakeLockServiceContext* context);
~WakeLockServiceImpl() override;
// WakeLockSevice implementation.
@@ -24,7 +23,8 @@ class WakeLockServiceImpl : public mojom::WakeLockService {
void CancelWakeLock() override;
private:
- base::WeakPtr<WakeLockServiceContext> context_;
+ // Will outlive this instance.
+ WakeLockServiceContext* context_;
bool wake_lock_request_outstanding_;
DISALLOW_COPY_AND_ASSIGN(WakeLockServiceImpl);

Powered by Google App Engine
This is Rietveld 408576698