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

Unified Diff: components/proximity_auth/proximity_auth_pref_manager.h

Issue 2973243002: Adding pref to store the user-selected proximity threshold. (Closed)
Patch Set: Fixing browser tests Created 3 years, 5 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: components/proximity_auth/proximity_auth_pref_manager.h
diff --git a/components/proximity_auth/proximity_auth_pref_manager.h b/components/proximity_auth/proximity_auth_pref_manager.h
index 9f74191417fc2f6efe8823ad2e81f4e26085ead1..08540218035184f71fe1cfbac281996893c98955 100644
--- a/components/proximity_auth/proximity_auth_pref_manager.h
+++ b/components/proximity_auth/proximity_auth_pref_manager.h
@@ -65,6 +65,22 @@ class ProximityAuthPrefManager {
virtual void SetLastPasswordEntryTimestampMs(int64_t timestamp_ms);
virtual int64_t GetLastPasswordEntryTimestampMs() const;
+ // These are arbitrary labels displayed in the settings page for the user
+ // to select. The actual mapping is done in the ProximityMonitorImpl.
+ enum ProximityThreshold {
+ kVeryClose = 0,
+ kClose = 1,
+ kFar = 2,
+ kVeryFar = 3
+ };
+
+ // Setter and getter for the proximity threshold. This preference is
+ // exposed to the user, allowing him / her to change how close the
+ // phone must for the unlock to be allowed.
+ // Note: These are arbitrary values,
+ virtual void SetProximityThreshold(ProximityThreshold value);
+ virtual ProximityThreshold GetProximityThreshold() const;
+
private:
const base::DictionaryValue* GetRemoteBleDevices() const;

Powered by Google App Engine
This is Rietveld 408576698