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

Unified Diff: chrome/browser/signin/easy_unlock_screenlock_state_handler.cc

Issue 749563002: easy-unlock: Do not show icon for online auth type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
diff --git a/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc b/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
index cc0ff76bae26983f502b086ce8f608a325a2ec4c..96d53cf45e4f0bee57684493a133d871b4b1635d 100644
--- a/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
+++ b/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
@@ -119,6 +119,12 @@ void EasyUnlockScreenlockStateHandler::ChangeState(State new_state) {
if (!screenlock_bridge_->IsLocked())
return;
+ // Do nothing when auth type is online.
+ if (screenlock_bridge_->lock_handler()->GetAuthType(user_email_) ==
+ ScreenlockBridge::LockHandler::ONLINE_SIGN_IN) {
+ return;
+ }
+
// No hardlock UI for trial run.
if (!is_trial_run_ && hardlock_state_ != NO_HARDLOCK) {
ShowHardlockUI();
@@ -313,8 +319,7 @@ void EasyUnlockScreenlockStateHandler::UpdateScreenlockAuthType() {
// Do not override online signin.
const ScreenlockBridge::LockHandler::AuthType existing_auth_type =
screenlock_bridge_->lock_handler()->GetAuthType(user_email_);
- if (existing_auth_type == ScreenlockBridge::LockHandler::ONLINE_SIGN_IN)
- return;
+ DCHECK_NE(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN, existing_auth_type);
if (state_ == STATE_AUTHENTICATED) {
if (existing_auth_type != ScreenlockBridge::LockHandler::USER_CLICK) {
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698