| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 virtual const base::ListValue* GetRemoteDevices() const = 0; | 63 virtual const base::ListValue* GetRemoteDevices() const = 0; |
| 64 virtual void SetRemoteDevices(const base::ListValue& devices) = 0; | 64 virtual void SetRemoteDevices(const base::ListValue& devices) = 0; |
| 65 virtual void ClearRemoteDevices() = 0; | 65 virtual void ClearRemoteDevices() = 0; |
| 66 | 66 |
| 67 // Runs the flow for turning Easy unlock off. | 67 // Runs the flow for turning Easy unlock off. |
| 68 virtual void RunTurnOffFlow() = 0; | 68 virtual void RunTurnOffFlow() = 0; |
| 69 | 69 |
| 70 // Resets the turn off flow if one is in progress. | 70 // Resets the turn off flow if one is in progress. |
| 71 virtual void ResetTurnOffFlow() = 0; | 71 virtual void ResetTurnOffFlow() = 0; |
| 72 | 72 |
| 73 // Returns the cirernt turn off flow status. | 73 // Returns the current turn off flow status. |
| 74 virtual TurnOffFlowStatus GetTurnOffFlowStatus() const = 0; | 74 virtual TurnOffFlowStatus GetTurnOffFlowStatus() const = 0; |
| 75 | 75 |
| 76 // Gets the challenge bytes for the currently associated user. |
| 77 virtual std::string GetChallenge() const = 0; |
| 78 |
| 76 // Gets |screenlock_state_handler_|. Returns NULL if Easy Unlock is not | 79 // Gets |screenlock_state_handler_|. Returns NULL if Easy Unlock is not |
| 77 // allowed. Otherwise, if |screenlock_state_handler_| is not set, an instance | 80 // allowed. Otherwise, if |screenlock_state_handler_| is not set, an instance |
| 78 // is created. Do not cache the returned value, as it may go away if Easy | 81 // is created. Do not cache the returned value, as it may go away if Easy |
| 79 // Unlock gets disabled. | 82 // Unlock gets disabled. |
| 80 EasyUnlockScreenlockStateHandler* GetScreenlockStateHandler(); | 83 EasyUnlockScreenlockStateHandler* GetScreenlockStateHandler(); |
| 81 | 84 |
| 82 // Whether easy unlock is allowed to be used. If the controlling preference | 85 // Whether easy unlock is allowed to be used. If the controlling preference |
| 83 // is set (from policy), this returns the preference value. Otherwise, it is | 86 // is set (from policy), this returns the preference value. Otherwise, it is |
| 84 // permitted either the flag is enabled or its field trial is enabled. | 87 // permitted either the flag is enabled or its field trial is enabled. |
| 85 bool IsAllowed(); | 88 bool IsAllowed(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 #endif | 145 #endif |
| 143 | 146 |
| 144 ObserverList<EasyUnlockServiceObserver> observers_; | 147 ObserverList<EasyUnlockServiceObserver> observers_; |
| 145 | 148 |
| 146 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; | 149 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; |
| 147 | 150 |
| 148 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); | 151 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); |
| 149 }; | 152 }; |
| 150 | 153 |
| 151 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 154 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
| OLD | NEW |