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

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

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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-users-page' is the settings page for managing user accounts on 7 * 'settings-users-page' is the settings page for managing user accounts on
8 * the device. 8 * the device.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 16 matching lines...) Expand all
27 27
28 /** @private */ 28 /** @private */
29 isWhitelistManaged_: { 29 isWhitelistManaged_: {
30 type: Boolean, 30 type: Boolean,
31 value: false, 31 value: false,
32 }, 32 },
33 }, 33 },
34 34
35 /** @override */ 35 /** @override */
36 created: function() { 36 created: function() {
37 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) { 37 chrome.usersPrivate.isCurrentUserOwner(isOwner => {
38 this.isOwner_ = isOwner; 38 this.isOwner_ = isOwner;
39 }.bind(this)); 39 });
40 40
41 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) { 41 chrome.usersPrivate.isWhitelistManaged(isWhitelistManaged => {
42 this.isWhitelistManaged_ = isWhitelistManaged; 42 this.isWhitelistManaged_ = isWhitelistManaged;
43 }.bind(this)); 43 });
44 }, 44 },
45 45
46 /** 46 /**
47 * @param {!Event} e 47 * @param {!Event} e
48 * @private 48 * @private
49 */ 49 */
50 openAddUserDialog_: function(e) { 50 openAddUserDialog_: function(e) {
51 e.preventDefault(); 51 e.preventDefault();
52 this.$.addUserDialog.open(); 52 this.$.addUserDialog.open();
53 }, 53 },
(...skipping 17 matching lines...) Expand all
71 * @param {boolean} isOwner 71 * @param {boolean} isOwner
72 * @param {boolean} isWhitelistManaged 72 * @param {boolean} isWhitelistManaged
73 * @param {boolean} allowGuest 73 * @param {boolean} allowGuest
74 * @private 74 * @private
75 * @return {boolean} 75 * @return {boolean}
76 */ 76 */
77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { 77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) {
78 return !isOwner || isWhitelistManaged || allowGuest; 78 return !isOwner || isWhitelistManaged || allowGuest;
79 } 79 }
80 }); 80 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/user_list.js ('k') | chrome/browser/resources/settings/prefs/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698