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

Side by Side Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 2128053002: Implements the feature notification for Quick Unlock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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/chromeos/login/lock/screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/audio/sounds.h" 10 #include "ash/audio/sounds.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 base::TimeDelta::FromMilliseconds(kUnlockGuardTimeoutMs)); 248 base::TimeDelta::FromMilliseconds(kUnlockGuardTimeoutMs));
249 delegate_->AnimateAuthenticationSuccess(); 249 delegate_->AnimateAuthenticationSuccess();
250 } 250 }
251 251
252 void ScreenLocker::OnPasswordAuthSuccess(const UserContext& user_context) { 252 void ScreenLocker::OnPasswordAuthSuccess(const UserContext& user_context) {
253 // The user has signed in using their password, so reset the PIN timeout. 253 // The user has signed in using their password, so reset the PIN timeout.
254 PinStorage* pin_storage = 254 PinStorage* pin_storage =
255 PinStorageFactory::GetForAccountId(user_context.GetAccountId()); 255 PinStorageFactory::GetForAccountId(user_context.GetAccountId());
256 if (pin_storage) 256 if (pin_storage)
257 pin_storage->MarkStrongAuth(); 257 pin_storage->MarkStrongAuth();
258 if (quickunlock::FeatureNotificationController::
259 ShouldShowNotificationForAccountId(user_context.GetAccountId())) {
260 qu_feature_notification_controller_ =
261 new quickunlock::FeatureNotificationController(
262 user_context.GetAccountId());
263 }
258 } 264 }
259 265
260 void ScreenLocker::UnlockOnLoginSuccess() { 266 void ScreenLocker::UnlockOnLoginSuccess() {
261 DCHECK(base::MessageLoopForUI::IsCurrent()); 267 DCHECK(base::MessageLoopForUI::IsCurrent());
262 if (!authentication_capture_.get()) { 268 if (!authentication_capture_.get()) {
263 LOG(WARNING) << "Call to UnlockOnLoginSuccess without previous " << 269 LOG(WARNING) << "Call to UnlockOnLoginSuccess without previous " <<
264 "authentication success."; 270 "authentication success.";
265 return; 271 return;
266 } 272 }
267 273
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 543
538 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const { 544 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const {
539 for (user_manager::User* user : users_) { 545 for (user_manager::User* user : users_) {
540 if (user->GetAccountId() == account_id) 546 if (user->GetAccountId() == account_id)
541 return true; 547 return true;
542 } 548 }
543 return false; 549 return false;
544 } 550 }
545 551
546 } // namespace chromeos 552 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698