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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 turn_off_flow_.reset(); | 354 turn_off_flow_.reset(); |
355 | 355 |
356 if (!success) { | 356 if (!success) { |
357 SetTurnOffFlowStatus(FAIL); | 357 SetTurnOffFlowStatus(FAIL); |
358 return; | 358 return; |
359 } | 359 } |
360 | 360 |
361 ClearRemoteDevices(); | 361 ClearRemoteDevices(); |
362 SetTurnOffFlowStatus(IDLE); | 362 SetTurnOffFlowStatus(IDLE); |
363 | 363 |
| 364 // Make sure lock screen state set by the extension gets reset. |
| 365 screenlock_state_handler_.reset(); |
| 366 |
364 if (GetComponentLoader(profile_)->Exists(extension_misc::kEasyUnlockAppId)) { | 367 if (GetComponentLoader(profile_)->Exists(extension_misc::kEasyUnlockAppId)) { |
365 extensions::ExtensionSystem* extension_system = | 368 extensions::ExtensionSystem* extension_system = |
366 extensions::ExtensionSystem::Get(profile_); | 369 extensions::ExtensionSystem::Get(profile_); |
367 extension_system->extension_service()->ReloadExtension( | 370 extension_system->extension_service()->ReloadExtension( |
368 extension_misc::kEasyUnlockAppId); | 371 extension_misc::kEasyUnlockAppId); |
369 } | 372 } |
370 } | 373 } |
OLD | NEW |