| 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 #include "chrome/browser/signin/easy_unlock_service.h" | 5 #include "chrome/browser/signin/easy_unlock_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "apps/app_lifetime_monitor.h" | 9 #include "apps/app_lifetime_monitor.h" |
| 10 #include "apps/app_lifetime_monitor_factory.h" | 10 #include "apps/app_lifetime_monitor_factory.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 user_prefs::PrefRegistrySyncable* registry) { | 257 user_prefs::PrefRegistrySyncable* registry) { |
| 258 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); | 258 registry->RegisterBooleanPref(prefs::kEasyUnlockAllowed, true); |
| 259 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); | 259 registry->RegisterBooleanPref(prefs::kEasyUnlockEnabled, false); |
| 260 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, | 260 registry->RegisterDictionaryPref(prefs::kEasyUnlockPairing, |
| 261 base::MakeUnique<base::DictionaryValue>()); | 261 base::MakeUnique<base::DictionaryValue>()); |
| 262 registry->RegisterBooleanPref( | 262 registry->RegisterBooleanPref( |
| 263 prefs::kEasyUnlockProximityRequired, | 263 prefs::kEasyUnlockProximityRequired, |
| 264 false, | 264 false, |
| 265 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 265 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 266 | 266 |
| 267 cryptauth::CryptAuthGCMManager::RegisterPrefs(registry); | |
| 268 cryptauth::CryptAuthDeviceManager::RegisterPrefs(registry); | |
| 269 cryptauth::CryptAuthEnrollmentManager::RegisterPrefs(registry); | |
| 270 | |
| 271 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 267 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 272 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery)) | 268 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery)) |
| 273 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry); | 269 proximity_auth::ProximityAuthPrefManager::RegisterPrefs(registry); |
| 274 } | 270 } |
| 275 | 271 |
| 276 // static | 272 // static |
| 277 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) { | 273 void EasyUnlockService::RegisterPrefs(PrefRegistrySimple* registry) { |
| 278 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string()); | 274 registry->RegisterStringPref(prefs::kEasyUnlockDeviceId, std::string()); |
| 279 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState); | 275 registry->RegisterDictionaryPref(prefs::kEasyUnlockHardlockState); |
| 280 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs); | 276 registry->RegisterDictionaryPref(prefs::kEasyUnlockLocalStateUserPrefs); |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 | 881 |
| 886 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt | 882 // TODO(tbarzic): Set check_private_key only if previous sign-in attempt |
| 887 // failed. | 883 // failed. |
| 888 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) | 884 EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile_) |
| 889 ->PrepareTpmKey(true /* check_private_key */, | 885 ->PrepareTpmKey(true /* check_private_key */, |
| 890 base::Closure()); | 886 base::Closure()); |
| 891 #endif // defined(OS_CHROMEOS) | 887 #endif // defined(OS_CHROMEOS) |
| 892 | 888 |
| 893 tpm_key_checked_ = true; | 889 tpm_key_checked_ = true; |
| 894 } | 890 } |
| OLD | NEW |