| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 virtual void Shutdown() override; | 170 virtual void Shutdown() override; |
| 171 | 171 |
| 172 // Exposes the profile to which the service is attached to subclasses. | 172 // Exposes the profile to which the service is attached to subclasses. |
| 173 Profile* profile() const { return profile_; } | 173 Profile* profile() const { return profile_; } |
| 174 | 174 |
| 175 // Installs the Easy unlock component app if it isn't installed and enables | 175 // Installs the Easy unlock component app if it isn't installed and enables |
| 176 // the app if it is disabled. | 176 // the app if it is disabled. |
| 177 void LoadApp(); | 177 void LoadApp(); |
| 178 | 178 |
| 179 // Disables the Easy unlock component app if it's loaded. | 179 // Disables the Easy unlock component app if it's loaded. |
| 180 void DisableAppIfLoaded(); | 180 // |reset_screenlock_state|: Whether the screenlock state should be reset |
| 181 // before disabling the app. If set, the caller should take care of |
| 182 // properly updating the screenlock state. |
| 183 void DisableAppIfLoaded(bool reset_screenlock_state); |
| 181 | 184 |
| 182 // Unloads the Easy unlock component app if it's loaded. | 185 // Unloads the Easy unlock component app if it's loaded. |
| 183 void UnloadApp(); | 186 void UnloadApp(); |
| 184 | 187 |
| 185 // Reloads the Easy unlock component app if it's loaded. | 188 // Reloads the Easy unlock component app if it's loaded. |
| 186 void ReloadApp(); | 189 void ReloadApp(); |
| 187 | 190 |
| 188 // Checks whether Easy unlock should be running and updates app state. | 191 // Checks whether Easy unlock should be running and updates app state. |
| 189 void UpdateAppState(); | 192 void UpdateAppState(); |
| 190 | 193 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 228 |
| 226 #if defined(OS_CHROMEOS) | 229 #if defined(OS_CHROMEOS) |
| 227 // Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock. | 230 // Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock. |
| 228 void OnCryptohomeKeysFetchedForChecking( | 231 void OnCryptohomeKeysFetchedForChecking( |
| 229 const std::string& user_id, | 232 const std::string& user_id, |
| 230 const std::set<std::string> paired_devices, | 233 const std::set<std::string> paired_devices, |
| 231 bool success, | 234 bool success, |
| 232 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); | 235 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); |
| 233 #endif | 236 #endif |
| 234 | 237 |
| 238 // Updates the service to state for handling system suspend. |
| 239 void PrepareForSuspend(); |
| 240 |
| 235 Profile* profile_; | 241 Profile* profile_; |
| 236 | 242 |
| 237 // Created lazily in |GetScreenlockStateHandler|. | 243 // Created lazily in |GetScreenlockStateHandler|. |
| 238 scoped_ptr<EasyUnlockScreenlockStateHandler> screenlock_state_handler_; | 244 scoped_ptr<EasyUnlockScreenlockStateHandler> screenlock_state_handler_; |
| 239 | 245 |
| 240 // The handler for the current auth attempt. Set iff an auth attempt is in | 246 // The handler for the current auth attempt. Set iff an auth attempt is in |
| 241 // progress. | 247 // progress. |
| 242 scoped_ptr<EasyUnlockAuthAttempt> auth_attempt_; | 248 scoped_ptr<EasyUnlockAuthAttempt> auth_attempt_; |
| 243 | 249 |
| 244 scoped_ptr<BluetoothDetector> bluetooth_detector_; | 250 scoped_ptr<BluetoothDetector> bluetooth_detector_; |
| 245 | 251 |
| 246 #if defined(OS_CHROMEOS) | 252 #if defined(OS_CHROMEOS) |
| 247 // Monitors suspend and wake state of ChromeOS. | 253 // Monitors suspend and wake state of ChromeOS. |
| 248 class PowerMonitor; | 254 class PowerMonitor; |
| 249 scoped_ptr<PowerMonitor> power_monitor_; | 255 scoped_ptr<PowerMonitor> power_monitor_; |
| 250 #endif | 256 #endif |
| 251 | 257 |
| 252 // Whether the service has been shut down. | 258 // Whether the service has been shut down. |
| 253 bool shut_down_; | 259 bool shut_down_; |
| 254 | 260 |
| 255 ObserverList<EasyUnlockServiceObserver> observers_; | 261 ObserverList<EasyUnlockServiceObserver> observers_; |
| 256 | 262 |
| 257 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; | 263 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; |
| 258 | 264 |
| 259 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); | 265 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); |
| 260 }; | 266 }; |
| 261 | 267 |
| 262 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 268 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
| OLD | NEW |