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

Side by Side Diff: components/proximity_auth/proximity_monitor.h

Issue 1372283002: Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: fix msan tests Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H
6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H
7 7
8 #include "components/proximity_auth/proximity_monitor_observer.h"
9
8 namespace proximity_auth { 10 namespace proximity_auth {
9 11
10 // An interface that is responsible for tracking whether the remote device is 12 // An interface that is responsible for tracking whether the remote device is
11 // sufficiently close to the local device to permit unlocking. 13 // sufficiently close to the local device to permit unlocking.
12 class ProximityMonitor { 14 class ProximityMonitor {
13 public: 15 public:
14 enum class Strategy { NONE, CHECK_RSSI, CHECK_TRANSMIT_POWER }; 16 enum class Strategy { NONE, CHECK_RSSI, CHECK_TRANSMIT_POWER };
15 17
16 virtual ~ProximityMonitor() {} 18 virtual ~ProximityMonitor() {}
17 19
(...skipping 13 matching lines...) Expand all
31 // given the user's current settings. 33 // given the user's current settings.
32 virtual bool IsUnlockAllowed() const = 0; 34 virtual bool IsUnlockAllowed() const = 0;
33 35
34 // Returns |true| iff the remote device is close enough to the local device, 36 // Returns |true| iff the remote device is close enough to the local device,
35 // according to its RSSI measurement. 37 // according to its RSSI measurement.
36 virtual bool IsInRssiRange() const = 0; 38 virtual bool IsInRssiRange() const = 0;
37 39
38 // Records the current proximity measurements to UMA. This should be called 40 // Records the current proximity measurements to UMA. This should be called
39 // when the user successfully authenticates using proximity auth. 41 // when the user successfully authenticates using proximity auth.
40 virtual void RecordProximityMetricsOnAuthSuccess() = 0; 42 virtual void RecordProximityMetricsOnAuthSuccess() = 0;
43
44 // Adds an observer.
45 virtual void AddObserver(ProximityMonitorObserver* observer) = 0;
46
47 // Removes an observer.
48 virtual void RemoveObserver(ProximityMonitorObserver* observer) = 0;
41 }; 49 };
42 50
43 } // namespace proximity_auth 51 } // namespace proximity_auth
44 52
45 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H 53 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_MONITOR_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698