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

Unified Diff: chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js

Issue 2154213008: Settings Router Refactor: Clean up Quick Unlock (and a few misc fixes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0211-settings-router-impl-part-3-navigateTo
Patch Set: change test 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js
diff --git a/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js b/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js
index 04f4917e02a515d5a39c6bc6e5d83178cd1461ea..c455a87ae55e2b10399718b5fa524db3ad7b3187 100644
--- a/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js
+++ b/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js
@@ -33,11 +33,15 @@ var QuickUnlockUnlockType = {
Polymer({
is: 'settings-quick-unlock-choose-method',
- behaviors: [
- PrefsBehavior, QuickUnlockPasswordDetectBehavior
- ],
+ behaviors: [PrefsBehavior, QuickUnlockPasswordDetectBehavior],
properties: {
+ /** @type {!settings.Route} */
+ currentRoute: {
+ type: Object,
+ observer: 'onRouteChanged_',
+ },
+
/** Preferences state. */
prefs: {
type: Object,
@@ -57,10 +61,7 @@ Polymer({
}
},
- observers: [
- 'onRouteChanged_(currentRoute)',
- 'onSetModesChanged_(setModes)'
- ],
+ observers: ['onSetModesChanged_(setModes)'],
/** @override */
attached: function() {
@@ -79,7 +80,7 @@ Polymer({
chrome.quickUnlockPrivate.onActiveModesChanged.addListener(
this.boundOnActiveModesChanged_);
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD))
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD)
this.askForPasswordIfUnset();
},
@@ -93,13 +94,13 @@ Polymer({
/** @private */
onRouteChanged_: function() {
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD))
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD)
this.askForPasswordIfUnset();
},
/** @private */
onSetModesChanged_: function() {
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD))
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD)
this.askForPasswordIfUnset();
},

Powered by Google App Engine
This is Rietveld 408576698