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

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

Issue 1857203003: Settings People Revamp: Fix Mange Profile empty name crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/browser/resources/settings/people_page/manage_profile.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-manage-profile' is the settings subpage containing controls to 7 * 'settings-manage-profile' is the settings subpage containing controls to
8 * edit a profile's name, icon, and desktop shortcut. 8 * edit a profile's name, icon, and desktop shortcut.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 handleAvailableIcons_: function(iconUrls) { 45 handleAvailableIcons_: function(iconUrls) {
46 this.availableIconUrls = iconUrls; 46 this.availableIconUrls = iconUrls;
47 }, 47 },
48 48
49 /** 49 /**
50 * Handler for when the profile name field is changed, then blurred. 50 * Handler for when the profile name field is changed, then blurred.
51 * @private 51 * @private
52 * @param {!Event} event 52 * @param {!Event} event
53 */ 53 */
54 onProfileNameChanged_: function(event) { 54 onProfileNameChanged_: function(event) {
55 if (event.target.invalid)
56 return;
57
55 settings.SyncPrivateApi.setProfileIconAndName(this.profileIconUrl, 58 settings.SyncPrivateApi.setProfileIconAndName(this.profileIconUrl,
56 event.target.value); 59 event.target.value);
57 }, 60 },
58 61
59 /** 62 /**
60 * Handler for when the user clicks a new profile icon. 63 * Handler for when the user clicks a new profile icon.
61 * @private 64 * @private
62 * @param {!Event} event 65 * @param {!Event} event
63 */ 66 */
64 onIconTap_: function(event) { 67 onIconTap_: function(event) {
(...skipping 19 matching lines...) Expand all
84 * Computed binding determining which profile icon button is toggled on. 87 * Computed binding determining which profile icon button is toggled on.
85 * @private 88 * @private
86 * @param {!string} iconUrl 89 * @param {!string} iconUrl
87 * @param {!string} paramIconUrl 90 * @param {!string} paramIconUrl
88 * @return {boolean} 91 * @return {boolean}
89 */ 92 */
90 isActiveIcon_: function(iconUrl, profileIconUrl) { 93 isActiveIcon_: function(iconUrl, profileIconUrl) {
91 return iconUrl == profileIconUrl; 94 return iconUrl == profileIconUrl;
92 }, 95 },
93 }); 96 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/manage_profile.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698