| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // logged in and his profile is initialized. | 57 // logged in and his profile is initialized. |
| 58 static EasyUnlockService* GetForUser(const user_manager::User& user); | 58 static EasyUnlockService* GetForUser(const user_manager::User& user); |
| 59 | 59 |
| 60 // Registers Easy Unlock profile preferences. | 60 // Registers Easy Unlock profile preferences. |
| 61 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 61 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 62 | 62 |
| 63 // Registers Easy Unlock local state entries. | 63 // Registers Easy Unlock local state entries. |
| 64 static void RegisterPrefs(PrefRegistrySimple* registry); | 64 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 65 | 65 |
| 66 // Removes the hardlock state for the given user. | 66 // Removes the hardlock state for the given user. |
| 67 static void RemoveHardlockStateForUser(const std::string& user_id); | 67 static void ResetLocalStateForUser(const std::string& user_id); |
| 68 | 68 |
| 69 // Returns the EasyUnlockService type. | 69 // Returns the EasyUnlockService type. |
| 70 virtual Type GetType() const = 0; | 70 virtual Type GetType() const = 0; |
| 71 | 71 |
| 72 // Returns the user currently associated with the service. | 72 // Returns the user currently associated with the service. |
| 73 virtual std::string GetUserEmail() const = 0; | 73 virtual std::string GetUserEmail() const = 0; |
| 74 | 74 |
| 75 // Launches Easy Unlock Setup app. | 75 // Launches Easy Unlock Setup app. |
| 76 virtual void LaunchSetup() = 0; | 76 virtual void LaunchSetup() = 0; |
| 77 | 77 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 // Callback when Bluetooth adapter present state changes. | 210 // Callback when Bluetooth adapter present state changes. |
| 211 void OnBluetoothAdapterPresentChanged(); | 211 void OnBluetoothAdapterPresentChanged(); |
| 212 | 212 |
| 213 // Saves hardlock state for the given user. Update UI if the currently | 213 // Saves hardlock state for the given user. Update UI if the currently |
| 214 // associated user is the same. | 214 // associated user is the same. |
| 215 void SetHardlockStateForUser( | 215 void SetHardlockStateForUser( |
| 216 const std::string& user_id, | 216 const std::string& user_id, |
| 217 EasyUnlockScreenlockStateHandler::HardlockState state); | 217 EasyUnlockScreenlockStateHandler::HardlockState state); |
| 218 | 218 |
| 219 // If needed, migrates prefs::kEasyUnlockShowTutorial pref from user prefs |
| 220 // to local state. |
| 221 void MaybeMigrateShowTutorialPref(const std::string& user_id); |
| 222 |
| 219 #if defined(OS_CHROMEOS) | 223 #if defined(OS_CHROMEOS) |
| 220 // Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock. | 224 // Callback for get key operation from CheckCryptohomeKeysAndMaybeHardlock. |
| 221 void OnCryptohomeKeysFetchedForChecking( | 225 void OnCryptohomeKeysFetchedForChecking( |
| 222 const std::string& user_id, | 226 const std::string& user_id, |
| 223 const std::set<std::string> paired_devices, | 227 const std::set<std::string> paired_devices, |
| 224 bool success, | 228 bool success, |
| 225 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); | 229 const chromeos::EasyUnlockDeviceKeyDataList& key_data_list); |
| 226 #endif | 230 #endif |
| 227 | 231 |
| 228 Profile* profile_; | 232 Profile* profile_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 246 bool shut_down_; | 250 bool shut_down_; |
| 247 | 251 |
| 248 ObserverList<EasyUnlockServiceObserver> observers_; | 252 ObserverList<EasyUnlockServiceObserver> observers_; |
| 249 | 253 |
| 250 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; | 254 base::WeakPtrFactory<EasyUnlockService> weak_ptr_factory_; |
| 251 | 255 |
| 252 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); | 256 DISALLOW_COPY_AND_ASSIGN(EasyUnlockService); |
| 253 }; | 257 }; |
| 254 | 258 |
| 255 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ | 259 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_H_ |
| OLD | NEW |