| 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_signin_chromeos.h" | 5 #include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 ShowInitialUserState(); | 254 ShowInitialUserState(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void EasyUnlockServiceSignin::OnScreenDidUnlock( | 257 void EasyUnlockServiceSignin::OnScreenDidUnlock( |
| 258 ScreenlockBridge::LockHandler::ScreenType screen_type) { | 258 ScreenlockBridge::LockHandler::ScreenType screen_type) { |
| 259 // In production code, the screen type should always be the signin screen; but | 259 // In production code, the screen type should always be the signin screen; but |
| 260 // in tests, the screen type might be different. | 260 // in tests, the screen type might be different. |
| 261 if (screen_type != ScreenlockBridge::LockHandler::SIGNIN_SCREEN) | 261 if (screen_type != ScreenlockBridge::LockHandler::SIGNIN_SCREEN) |
| 262 return; | 262 return; |
| 263 | 263 |
| 264 DisableAppWithoutResettingScreenlockState(); |
| 265 |
| 264 Shutdown(); | 266 Shutdown(); |
| 265 } | 267 } |
| 266 | 268 |
| 267 void EasyUnlockServiceSignin::OnFocusedUserChanged(const std::string& user_id) { | 269 void EasyUnlockServiceSignin::OnFocusedUserChanged(const std::string& user_id) { |
| 268 if (user_id_ == user_id) | 270 if (user_id_ == user_id) |
| 269 return; | 271 return; |
| 270 | 272 |
| 271 // Setting or clearing the user_id may changed |IsAllowed| value, so in these | 273 // Setting or clearing the user_id may changed |IsAllowed| value, so in these |
| 272 // cases update the app state. Otherwise, it's enough to notify the app the | 274 // cases update the app state. Otherwise, it's enough to notify the app the |
| 273 // user data has been updated. | 275 // user data has been updated. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 return NULL; | 355 return NULL; |
| 354 | 356 |
| 355 std::map<std::string, UserData*>::const_iterator it = | 357 std::map<std::string, UserData*>::const_iterator it = |
| 356 user_data_.find(user_id_); | 358 user_data_.find(user_id_); |
| 357 if (it == user_data_.end()) | 359 if (it == user_data_.end()) |
| 358 return NULL; | 360 return NULL; |
| 359 if (it->second->state != USER_DATA_STATE_LOADED) | 361 if (it->second->state != USER_DATA_STATE_LOADED) |
| 360 return NULL; | 362 return NULL; |
| 361 return it->second; | 363 return it->second; |
| 362 } | 364 } |
| OLD | NEW |