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

Side by Side Diff: chrome/browser/resources/md_user_manager/supervised_user_create_confirm.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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 'supervised-user-create-confirm' is a page that is displayed 6 * @fileoverview 'supervised-user-create-confirm' is a page that is displayed
7 * upon successful creation of a supervised user. It contains information for 7 * upon successful creation of a supervised user. It contains information for
8 * the custodian on where to configure browsing restrictions as well as how to 8 * the custodian on where to configure browsing restrictions as well as how to
9 * exit and childlock their profile. 9 * exit and childlock their profile.
10 */ 10 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return elide(name, MAX_NAME_LENGTH); 83 return elide(name, MAX_NAME_LENGTH);
84 }, 84 },
85 85
86 /** 86 /**
87 * Computed binding returning the text of the title section. 87 * Computed binding returning the text of the title section.
88 * @param {?ProfileInfo} profileInfo 88 * @param {?ProfileInfo} profileInfo
89 * @return {string} 89 * @return {string}
90 * @private 90 * @private
91 */ 91 */
92 titleText_: function(profileInfo) { 92 titleText_: function(profileInfo) {
93 return this.i18n('supervisedUserCreatedTitle', 93 return this.i18n(
94 this.elideProfileName_(profileInfo)); 94 'supervisedUserCreatedTitle', this.elideProfileName_(profileInfo));
95 }, 95 },
96 96
97 /** 97 /**
98 * Computed binding returning the sanitized confirmation HTML message that is 98 * Computed binding returning the sanitized confirmation HTML message that is
99 * safe to set as innerHTML. 99 * safe to set as innerHTML.
100 * @param {?ProfileInfo} profileInfo 100 * @param {?ProfileInfo} profileInfo
101 * @return {string} 101 * @return {string}
102 * @private 102 * @private
103 */ 103 */
104 confirmationMessage_: function(profileInfo) { 104 confirmationMessage_: function(profileInfo) {
105 return this.i18nAdvanced('supervisedUserCreatedText', { 105 return this.i18nAdvanced('supervisedUserCreatedText', {
106 substitutions: [ 106 substitutions: [
107 this.elideProfileName_(profileInfo), 107 this.elideProfileName_(profileInfo),
108 this.elideCustodianUsername_(profileInfo) 108 this.elideCustodianUsername_(profileInfo)
109 ], 109 ],
110 }); 110 });
111 }, 111 },
112 112
113 /** 113 /**
114 * Computed binding returning the text of the 'Switch To User' button. 114 * Computed binding returning the text of the 'Switch To User' button.
115 * @param {?ProfileInfo} profileInfo 115 * @param {?ProfileInfo} profileInfo
116 * @return {string} 116 * @return {string}
117 * @private 117 * @private
118 */ 118 */
119 switchUserText_: function(profileInfo) { 119 switchUserText_: function(profileInfo) {
120 return this.i18n('supervisedUserCreatedSwitch', 120 return this.i18n(
121 this.elideProfileName_(profileInfo)); 121 'supervisedUserCreatedSwitch', this.elideProfileName_(profileInfo));
122 }, 122 },
123 123
124 /** 124 /**
125 * Handler for the 'Ok' button tap event. 125 * Handler for the 'Ok' button tap event.
126 * @param {!Event} event 126 * @param {!Event} event
127 * @private 127 * @private
128 */ 128 */
129 onOkTap_: function(event) { 129 onOkTap_: function(event) {
130 // Event is caught by user-manager-pages. 130 // Event is caught by user-manager-pages.
131 this.fire('change-page', {page: 'user-pods-page'}); 131 this.fire('change-page', {page: 'user-pods-page'});
132 }, 132 },
133 133
134 /** 134 /**
135 * Handler for the 'Switch To User' button tap event. 135 * Handler for the 'Switch To User' button tap event.
136 * @param {!Event} event 136 * @param {!Event} event
137 * @private 137 * @private
138 */ 138 */
139 onSwitchUserTap_: function(event) { 139 onSwitchUserTap_: function(event) {
140 this.browserProxy_.switchToProfile(this.profileInfo.filePath); 140 this.browserProxy_.switchToProfile(this.profileInfo.filePath);
141 // Event is caught by user-manager-pages. 141 // Event is caught by user-manager-pages.
142 this.fire('change-page', {page: 'user-pods-page'}); 142 this.fire('change-page', {page: 'user-pods-page'});
143 } 143 }
144 }); 144 });
145 })(); 145 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698