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

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

Issue 2957153003: MD Settings: remove unsupported routes from guest-mode. (Closed)
Patch Set: merge 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-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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 var setIcons = function(icons) { 70 var setIcons = function(icons) {
71 this.availableIcons = icons; 71 this.availableIcons = icons;
72 }.bind(this); 72 }.bind(this);
73 73
74 this.addWebUIListener('available-icons-changed', setIcons); 74 this.addWebUIListener('available-icons-changed', setIcons);
75 this.browserProxy_.getAvailableIcons().then(setIcons); 75 this.browserProxy_.getAvailableIcons().then(setIcons);
76 }, 76 },
77 77
78 /** @protected */ 78 /** @protected */
79 currentRouteChanged: function() { 79 currentRouteChanged: function() {
80 if (settings.getCurrentRoute() == settings.Route.MANAGE_PROFILE) { 80 if (settings.getCurrentRoute() == settings.routes.MANAGE_PROFILE) {
81 this.$.name.value = this.profileName; 81 this.$.name.value = this.profileName;
82 82
83 if (loadTimeData.getBoolean('profileShortcutsEnabled')) { 83 if (loadTimeData.getBoolean('profileShortcutsEnabled')) {
84 this.browserProxy_.getProfileShortcutStatus().then(function(status) { 84 this.browserProxy_.getProfileShortcutStatus().then(function(status) {
85 if (status == ProfileShortcutStatus.PROFILE_SHORTCUT_SETTING_HIDDEN) { 85 if (status == ProfileShortcutStatus.PROFILE_SHORTCUT_SETTING_HIDDEN) {
86 this.isProfileShortcutSettingVisible_ = false; 86 this.isProfileShortcutSettingVisible_ = false;
87 return; 87 return;
88 } 88 }
89 89
90 this.isProfileShortcutSettingVisible_ = true; 90 this.isProfileShortcutSettingVisible_ = true;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 * @private 145 * @private
146 */ 146 */
147 onHasProfileShortcutChange_: function(event) { 147 onHasProfileShortcutChange_: function(event) {
148 if (this.hasProfileShortcut_) { 148 if (this.hasProfileShortcut_) {
149 this.browserProxy_.addProfileShortcut(); 149 this.browserProxy_.addProfileShortcut();
150 } else { 150 } else {
151 this.browserProxy_.removeProfileShortcut(); 151 this.browserProxy_.removeProfileShortcut();
152 } 152 }
153 } 153 }
154 }); 154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698