Chromium Code Reviews| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 | 124 |
| 125 // static | 125 // static |
| 126 void EasyUnlockService::RegisterProfilePrefs( | 126 void EasyUnlockService::RegisterProfilePrefs( |
| 127 user_prefs::PrefRegistrySyncable* registry) { | 127 user_prefs::PrefRegistrySyncable* registry) { |
| 128 registry->RegisterBooleanPref( | 128 registry->RegisterBooleanPref( |
| 129 prefs::kEasyUnlockEnabled, | 129 prefs::kEasyUnlockEnabled, |
| 130 false, | 130 false, |
| 131 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 131 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 132 registry->RegisterBooleanPref( | 132 registry->RegisterBooleanPref( |
| 133 prefs::kEasyUnlockShowTutorial, | 133 prefs::kEasyUnlockShowTutorial, |
| 134 false, | 134 true, |
| 135 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 135 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 136 registry->RegisterDictionaryPref( | 136 registry->RegisterDictionaryPref( |
| 137 prefs::kEasyUnlockPairing, | 137 prefs::kEasyUnlockPairing, |
| 138 new base::DictionaryValue(), | 138 new base::DictionaryValue(), |
| 139 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 139 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 140 registry->RegisterBooleanPref( | 140 registry->RegisterBooleanPref( |
| 141 prefs::kEasyUnlockAllowed, | 141 prefs::kEasyUnlockAllowed, |
| 142 true, | 142 true, |
| 143 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 143 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 144 } | 144 } |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 359 } | 359 } |
| 360 | 360 |
| 361 ClearRemoteDevices(); | 361 ClearRemoteDevices(); |
| 362 SetTurnOffFlowStatus(IDLE); | 362 SetTurnOffFlowStatus(IDLE); |
| 363 | 363 |
| 364 if (GetComponentLoader(profile_)->Exists(extension_misc::kEasyUnlockAppId)) { | 364 if (GetComponentLoader(profile_)->Exists(extension_misc::kEasyUnlockAppId)) { |
| 365 extensions::ExtensionSystem* extension_system = | 365 extensions::ExtensionSystem* extension_system = |
| 366 extensions::ExtensionSystem::Get(profile_); | 366 extensions::ExtensionSystem::Get(profile_); |
| 367 extension_system->extension_service()->ReloadExtension( | 367 extension_system->extension_service()->ReloadExtension( |
| 368 extension_misc::kEasyUnlockAppId); | 368 extension_misc::kEasyUnlockAppId); |
| 369 | |
| 370 // Make sure lock screen state set by the extension gets reset. | |
| 371 screenlock_state_handler_.reset(); | |
|
xiyuan
2014/08/19 20:17:13
Do we want to always do this rather than only when
tbarzic
2014/08/19 20:24:59
yeah, that would probably be a bit cleaner (though
| |
| 369 } | 372 } |
| 370 } | 373 } |
| OLD | NEW |