Chromium Code Reviews| Index: chrome/browser/resources/settings/people_page/quick_unlock_validating_behavior.js |
| diff --git a/chrome/browser/resources/settings/people_page/quick_unlock_validating_behavior.js b/chrome/browser/resources/settings/people_page/quick_unlock_validating_behavior.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fa9d42f16c1a2f6692135451e07ab24bb56fd31d |
| --- /dev/null |
| +++ b/chrome/browser/resources/settings/people_page/quick_unlock_validating_behavior.js |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * @fileoverview |
| + * Contains utilities for verifying the user has entered an account password. |
| + */ |
| + |
| +/** @polymerBehavior */ |
| +var QuickUnlockValidatingBehavior = [QuickUnlockRoutingBehavior, { |
| + properties: { |
| + setModes: Object |
| + }, |
| + |
| + /** |
| + * Verifies that there is an account password. If there is no password, this |
| + * will redirect to the authenticate screen. |
| + */ |
| + checkForPassword: function() { |
|
tommycli
2016/06/29 22:56:09
Maybe rename this to: askForPasswordIfUnset, or so
jdufault
2016/06/30 18:10:18
Done, this is a much better name.
|
| + if (!this.setModes) { |
| + this.currentRoute = { |
| + page: 'basic', |
| + section: 'people', |
| + subpage: [QuickUnlockScreen.AUTHENTICATE] |
| + }; |
| + } |
| + } |
| +}]; |