| 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_regular.h" | 5 #include "chrome/browser/signin/easy_unlock_service_regular.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 void EasyUnlockServiceRegular::ResetTurnOffFlow() { | 145 void EasyUnlockServiceRegular::ResetTurnOffFlow() { |
| 146 turn_off_flow_.reset(); | 146 turn_off_flow_.reset(); |
| 147 SetTurnOffFlowStatus(IDLE); | 147 SetTurnOffFlowStatus(IDLE); |
| 148 } | 148 } |
| 149 | 149 |
| 150 EasyUnlockService::TurnOffFlowStatus | 150 EasyUnlockService::TurnOffFlowStatus |
| 151 EasyUnlockServiceRegular::GetTurnOffFlowStatus() const { | 151 EasyUnlockServiceRegular::GetTurnOffFlowStatus() const { |
| 152 return turn_off_flow_status_; | 152 return turn_off_flow_status_; |
| 153 } | 153 } |
| 154 | 154 |
| 155 std::string EasyUnlockServiceRegular::GetChallenge() const { |
| 156 return std::string(); |
| 157 } |
| 158 |
| 155 void EasyUnlockServiceRegular::InitializeInternal() { | 159 void EasyUnlockServiceRegular::InitializeInternal() { |
| 156 registrar_.Init(profile()->GetPrefs()); | 160 registrar_.Init(profile()->GetPrefs()); |
| 157 registrar_.Add( | 161 registrar_.Add( |
| 158 prefs::kEasyUnlockAllowed, | 162 prefs::kEasyUnlockAllowed, |
| 159 base::Bind(&EasyUnlockServiceRegular::OnPrefsChanged, | 163 base::Bind(&EasyUnlockServiceRegular::OnPrefsChanged, |
| 160 base::Unretained(this))); | 164 base::Unretained(this))); |
| 161 OnPrefsChanged(); | 165 OnPrefsChanged(); |
| 162 } | 166 } |
| 163 | 167 |
| 164 bool EasyUnlockServiceRegular::IsAllowedInternal() { | 168 bool EasyUnlockServiceRegular::IsAllowedInternal() { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 190 | 194 |
| 191 if (!success) { | 195 if (!success) { |
| 192 SetTurnOffFlowStatus(FAIL); | 196 SetTurnOffFlowStatus(FAIL); |
| 193 return; | 197 return; |
| 194 } | 198 } |
| 195 | 199 |
| 196 ClearRemoteDevices(); | 200 ClearRemoteDevices(); |
| 197 SetTurnOffFlowStatus(IDLE); | 201 SetTurnOffFlowStatus(IDLE); |
| 198 ReloadApp(); | 202 ReloadApp(); |
| 199 } | 203 } |
| OLD | NEW |