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

Unified Diff: components/proximity_auth/proximity_monitor_impl.h

Issue 1377313002: Revert of Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: Created 5 years, 3 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 | « components/proximity_auth/proximity_monitor.h ('k') | components/proximity_auth/proximity_monitor_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/proximity_monitor_impl.h
diff --git a/components/proximity_auth/proximity_monitor_impl.h b/components/proximity_auth/proximity_monitor_impl.h
index 28398830794a6e44295b96d4a2a2bd468a6b5b4c..1f0e8a20c6381cc3cf14e54d4924812368a78055 100644
--- a/components/proximity_auth/proximity_monitor_impl.h
+++ b/components/proximity_auth/proximity_monitor_impl.h
@@ -9,7 +9,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
#include "components/proximity_auth/proximity_monitor.h"
#include "components/proximity_auth/remote_device.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -32,7 +31,8 @@
public:
// The |observer| is not owned, and must outlive |this| instance.
ProximityMonitorImpl(const RemoteDevice& remote_device,
- scoped_ptr<base::TickClock> clock);
+ scoped_ptr<base::TickClock> clock,
+ ProximityMonitorObserver* observer);
~ProximityMonitorImpl() override;
// ProximityMonitor:
@@ -42,8 +42,6 @@
bool IsUnlockAllowed() const override;
bool IsInRssiRange() const override;
void RecordProximityMetricsOnAuthSuccess() override;
- void AddObserver(ProximityMonitorObserver* observer) override;
- void RemoveObserver(ProximityMonitorObserver* observer) override;
protected:
// Sets the proximity detection strategy. Exposed for testing.
@@ -99,14 +97,13 @@
const device::BluetoothDevice::ConnectionInfo& connection_info);
// Checks whether the proximity state has changed based on the current
- // samples. Notifies |observers_| on a change.
+ // samples. Notifies the |observer_| on a change.
void CheckForProximityStateChange();
- // The remote device being monitored.
const RemoteDevice remote_device_;
- // The observers attached to the ProximityMonitor.
- base::ObserverList<ProximityMonitorObserver> observers_;
+ // The |observer_| is not owned, and must outlive |this| instance.
+ ProximityMonitorObserver* observer_;
// The Bluetooth adapter that will be polled for connection info.
scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
« no previous file with comments | « components/proximity_auth/proximity_monitor.h ('k') | components/proximity_auth/proximity_monitor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698