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

Side by Side Diff: chrome/browser/resources/settings/people_page/lock_screen.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-lock-screen' allows the user to change how they unlock their 7 * 'settings-lock-screen' allows the user to change how they unlock their
8 * device. 8 * device.
9 * 9 *
10 * Example: 10 * Example:
11 * 11 *
12 * <settings-lock-screen 12 * <settings-lock-screen
13 * prefs="{{prefs}}"> 13 * prefs="{{prefs}}">
14 * </settings-lock-screen> 14 * </settings-lock-screen>
15 */ 15 */
16 16
17 Polymer({ 17 Polymer({
18 is: 'settings-lock-screen', 18 is: 'settings-lock-screen',
19 19
20 behaviors: [I18nBehavior, LockStateBehavior, settings.RouteObserverBehavior], 20 behaviors: [I18nBehavior, LockStateBehavior, settings.RouteObserverBehavior],
21 21
22 properties: { 22 properties: {
23 /** Preferences state. */ 23 /** Preferences state. */
24 prefs: { 24 prefs: {type: Object},
25 type: Object
26 },
27 25
28 /** 26 /**
29 * setModes_ is a partially applied function that stores the previously 27 * setModes_ is a partially applied function that stores the previously
30 * entered password. It's defined only when the user has already entered a 28 * entered password. It's defined only when the user has already entered a
31 * valid password. 29 * valid password.
32 * 30 *
33 * @type {Object|undefined} 31 * @type {Object|undefined}
34 * @private 32 * @private
35 */ 33 */
36 setModes_: { 34 setModes_: {type: Object, observer: 'onSetModesChanged_'},
37 type: Object,
38 observer: 'onSetModesChanged_'
39 },
40 35
41 /** 36 /**
42 * writeUma_ is a function that handles writing uma stats. It may be 37 * writeUma_ is a function that handles writing uma stats. It may be
43 * overridden for tests. 38 * overridden for tests.
44 * 39 *
45 * @type {Function} 40 * @type {Function}
46 * @private 41 * @private
47 */ 42 */
48 writeUma_: { 43 writeUma_: {
49 type: Object, 44 type: Object,
50 value: function() { return settings.recordLockScreenProgress; } 45 value: function() {
46 return settings.recordLockScreenProgress;
47 }
51 } 48 }
52 }, 49 },
53 50
54 /** selectedUnlockType is defined in LockStateBehavior. */ 51 /** selectedUnlockType is defined in LockStateBehavior. */
55 observers: ['selectedUnlockTypeChanged_(selectedUnlockType)'], 52 observers: ['selectedUnlockTypeChanged_(selectedUnlockType)'],
56 53
57 /** @override */ 54 /** @override */
58 attached: function() { 55 attached: function() {
59 // currentRouteChanged is not called during the initial navigation. If the 56 // currentRouteChanged is not called during the initial navigation. If the
60 // user navigates directly to the lockScreen page, we still want to show the 57 // user navigates directly to the lockScreen page, we still want to show the
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 /** 130 /**
134 * @param {!Event} e 131 * @param {!Event} e
135 * @private 132 * @private
136 */ 133 */
137 onConfigurePin_: function(e) { 134 onConfigurePin_: function(e) {
138 e.preventDefault(); 135 e.preventDefault();
139 this.$.setupPin.open(); 136 this.$.setupPin.open();
140 this.writeUma_(LockScreenProgress.CHOOSE_PIN_OR_PASSWORD); 137 this.writeUma_(LockScreenProgress.CHOOSE_PIN_OR_PASSWORD);
141 }, 138 },
142 }); 139 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698