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

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

Issue 485243002: Fix few minor easy unlock bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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 5ddb98f1af5eebab988d112c5206eb398ec8ac8e..fa03b4a53b5b35e063d5c4acbb2bfe7c33cee12f 100644
--- a/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
+++ b/chrome/browser/signin/easy_unlock_screenlock_state_handler.cc
@@ -28,6 +28,7 @@ std::string GetIconURLForState(EasyUnlockScreenlockStateHandler::State state) {
case EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED:
case EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY:
case EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE:
+ case EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED:
return "chrome://theme/IDR_EASY_UNLOCK_LOCKED";
case EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING:
return "chrome://theme/IDR_EASY_UNLOCK_SPINNER";
@@ -42,7 +43,8 @@ bool UseOpaqueIcon(EasyUnlockScreenlockStateHandler::State state) {
return state == EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH ||
state == EasyUnlockScreenlockStateHandler::STATE_NO_PHONE ||
state == EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_NEARBY ||
- state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE;
+ state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE ||
+ state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED;
}
bool HasAnimation(EasyUnlockScreenlockStateHandler::State state) {
@@ -69,11 +71,20 @@ size_t GetTooltipResourceId(EasyUnlockScreenlockStateHandler::State state) {
return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_PHONE_NOT_NEARBY;
case EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED:
return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_HARDLOCK_INSTRUCTIONS;
+ case EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED:
+ return IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_UNSUPPORTED_ANDROID_VERSION;
default:
return 0;
}
}
+bool TooltipContainsDeviceType(EasyUnlockScreenlockStateHandler::State state) {
+ return state == EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED ||
+ state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE ||
+ state == EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH ||
+ state == EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED;
+}
+
} // namespace
@@ -162,7 +173,7 @@ void EasyUnlockScreenlockStateHandler::UpdateTooltipOptions(
resource_id = IDS_EASY_UNLOCK_SCREENLOCK_TOOLTIP_TUTORIAL;
} else {
resource_id = GetTooltipResourceId(state_);
- if (state_ == STATE_AUTHENTICATED || state_ == STATE_PHONE_UNLOCKABLE)
+ if (TooltipContainsDeviceType(state_))
device_name = GetDeviceName();
}
« no previous file with comments | « chrome/browser/signin/easy_unlock_screenlock_state_handler.h ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698