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

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

Issue 534073003: easy-unlock: Enable hardlock in states other than AUTHENTICATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc » ('j') | 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_screenlock_state_handler.h" 5 #include "chrome/browser/signin/easy_unlock_screenlock_state_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY || 45 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY ||
46 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE || 46 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE ||
47 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED; 47 state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED;
48 } 48 }
49 49
50 bool HasAnimation(EasyUnlockScreenlockStateHandler::State state) { 50 bool HasAnimation(EasyUnlockScreenlockStateHandler::State state) {
51 return state == EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING; 51 return state == EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING;
52 } 52 }
53 53
54 bool HardlockOnClick(EasyUnlockScreenlockStateHandler::State state) { 54 bool HardlockOnClick(EasyUnlockScreenlockStateHandler::State state) {
55 return state == EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED; 55 return state != EasyUnlockScreenlockStateHandler::STATE_INACTIVE;
56 } 56 }
57 57
58 size_t GetTooltipResourceId(EasyUnlockScreenlockStateHandler::State state) { 58 size_t GetTooltipResourceId(EasyUnlockScreenlockStateHandler::State state) {
59 switch (state) { 59 switch (state) {
60 case EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH: 60 case EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH:
61 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_NO_BLUETOOTH; 61 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_NO_BLUETOOTH;
62 case EasyUnlockScreenlockStateHandler::STATE_NO_PHONE: 62 case EasyUnlockScreenlockStateHandler::STATE_NO_PHONE:
63 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_NO_PHONE; 63 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_NO_PHONE;
64 case EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED: 64 case EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED:
65 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_PHONE_NOT_AUTHENTICATED; 65 return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_PHONE_NOT_AUTHENTICATED;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 l10n_util::GetStringUTF16( 227 l10n_util::GetStringUTF16(
228 IDS_EASY_UNLOCK_SCREENLOCK_USER_POD_AUTH_VALUE)); 228 IDS_EASY_UNLOCK_SCREENLOCK_USER_POD_AUTH_VALUE));
229 } else if (screenlock_bridge_->lock_handler()->GetAuthType(user_email_) != 229 } else if (screenlock_bridge_->lock_handler()->GetAuthType(user_email_) !=
230 ScreenlockBridge::LockHandler::OFFLINE_PASSWORD) { 230 ScreenlockBridge::LockHandler::OFFLINE_PASSWORD) {
231 screenlock_bridge_->lock_handler()->SetAuthType( 231 screenlock_bridge_->lock_handler()->SetAuthType(
232 user_email_, 232 user_email_,
233 ScreenlockBridge::LockHandler::OFFLINE_PASSWORD, 233 ScreenlockBridge::LockHandler::OFFLINE_PASSWORD,
234 base::string16()); 234 base::string16());
235 } 235 }
236 } 236 }
OLDNEW
« 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