Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_AUTH_PREF_MANAGER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_PREF_MANAGER_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_PREF_MANAGER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_PREF_MANAGER_H |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 const std::string& bluetooth_address) const; | 58 const std::string& bluetooth_address) const; |
| 59 virtual std::string GetDeviceAddress(const std::string& public_key) const; | 59 virtual std::string GetDeviceAddress(const std::string& public_key) const; |
| 60 virtual std::vector<std::string> GetPublicKeys() const; | 60 virtual std::vector<std::string> GetPublicKeys() const; |
| 61 | 61 |
| 62 // Setter and getter for the timestamp of the last password entry. This | 62 // Setter and getter for the timestamp of the last password entry. This |
| 63 // preference is used to enforce reauthing with the password after a given | 63 // preference is used to enforce reauthing with the password after a given |
| 64 // time period has elapsed. | 64 // time period has elapsed. |
| 65 virtual void SetLastPasswordEntryTimestampMs(int64_t timestamp_ms); | 65 virtual void SetLastPasswordEntryTimestampMs(int64_t timestamp_ms); |
| 66 virtual int64_t GetLastPasswordEntryTimestampMs() const; | 66 virtual int64_t GetLastPasswordEntryTimestampMs() const; |
| 67 | 67 |
| 68 // Setter and getter for the proximity threshold. This preference is | |
| 69 // exposed to the user, allowing him / her to change how close the | |
| 70 // phone must for the unlock to be allowed. | |
| 71 // Note: These are arbitrary values, the actual mapping is done in the | |
| 72 // ProximityMonitorImpl. | |
| 73 virtual void SetProximityThreshold(int value); | |
|
Tim Song
2017/07/10 19:27:56
This |value| should be an enum.
sacomoto
2017/07/11 09:56:06
Done.
| |
| 74 virtual int GetProximityThreshold() const; | |
| 75 | |
| 68 private: | 76 private: |
| 69 const base::DictionaryValue* GetRemoteBleDevices() const; | 77 const base::DictionaryValue* GetRemoteBleDevices() const; |
| 70 | 78 |
| 71 // Contains perferences that outlive the lifetime of this object and across | 79 // Contains perferences that outlive the lifetime of this object and across |
| 72 // process restarts. Not owned and must outlive this instance. | 80 // process restarts. Not owned and must outlive this instance. |
| 73 PrefService* pref_service_; | 81 PrefService* pref_service_; |
| 74 | 82 |
| 75 DISALLOW_COPY_AND_ASSIGN(ProximityAuthPrefManager); | 83 DISALLOW_COPY_AND_ASSIGN(ProximityAuthPrefManager); |
| 76 }; | 84 }; |
| 77 | 85 |
| 78 } // namespace proximity_auth | 86 } // namespace proximity_auth |
| 79 | 87 |
| 80 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_PREF_MANAGER_H | 88 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_PREF_MANAGER_H |
| OLD | NEW |