Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: chrome/browser/signin/easy_unlock_service_signin_chromeos.cc

Issue 924113003: Don't disable easy unlock app on keyed service shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698