| OLD | NEW |
| 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 Helper object and related behavior that encapsulate messaging | 6 * @fileoverview Helper object and related behavior that encapsulate messaging |
| 7 * between JS and C++ for creating/importing profiles in the user-manager page. | 7 * between JS and C++ for creating/importing profiles in the user-manager page. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** @typedef {{username: string, profilePath: string}} */ | 10 /** @typedef {{username: string, profilePath: string}} */ |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 */ | 60 */ |
| 61 getExistingSupervisedUsers: function(profilePath) { | 61 getExistingSupervisedUsers: function(profilePath) { |
| 62 assertNotReached(); | 62 assertNotReached(); |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * Creates a profile. | 66 * Creates a profile. |
| 67 * @param {string} profileName Name of the new profile. | 67 * @param {string} profileName Name of the new profile. |
| 68 * @param {string} profileIconUrl URL of the selected icon of the new | 68 * @param {string} profileIconUrl URL of the selected icon of the new |
| 69 * profile. | 69 * profile. |
| 70 * @param {boolean} createShortcut if true a desktop shortcut will be |
| 71 * created. |
| 70 * @param {boolean} isSupervised True if the new profile is supervised. | 72 * @param {boolean} isSupervised True if the new profile is supervised. |
| 71 * @param {string} supervisedUserId ID of the supervised user to be | 73 * @param {string} supervisedUserId ID of the supervised user to be |
| 72 * imported. | 74 * imported. |
| 73 * @param {string} custodianProfilePath Profile path of the custodian if | 75 * @param {string} custodianProfilePath Profile path of the custodian if |
| 74 * the new profile is supervised. | 76 * the new profile is supervised. |
| 75 */ | 77 */ |
| 76 createProfile: function(profileName, profileIconUrl, isSupervised, | 78 createProfile: function(profileName, profileIconUrl, createShortcut, |
| 77 supervisedUserId, custodianProfilePath) { | 79 isSupervised, supervisedUserId, custodianProfilePath) { |
| 78 assertNotReached(); | 80 assertNotReached(); |
| 79 }, | 81 }, |
| 80 | 82 |
| 81 /** | 83 /** |
| 82 * Cancels creation of the new profile. | 84 * Cancels creation of the new profile. |
| 83 */ | 85 */ |
| 84 cancelCreateProfile: function() { | 86 cancelCreateProfile: function() { |
| 85 assertNotReached(); | 87 assertNotReached(); |
| 86 }, | 88 }, |
| 87 | 89 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 launchGuestUser: function() { | 170 launchGuestUser: function() { |
| 169 chrome.send('launchGuest'); | 171 chrome.send('launchGuest'); |
| 170 }, | 172 }, |
| 171 | 173 |
| 172 /** @override */ | 174 /** @override */ |
| 173 getExistingSupervisedUsers: function(profilePath) { | 175 getExistingSupervisedUsers: function(profilePath) { |
| 174 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); | 176 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); |
| 175 }, | 177 }, |
| 176 | 178 |
| 177 /** @override */ | 179 /** @override */ |
| 178 createProfile: function(profileName, profileIconUrl, isSupervised, | 180 createProfile: function(profileName, profileIconUrl, createShortcut, |
| 179 supervisedUserId, custodianProfilePath) { | 181 isSupervised, supervisedUserId, custodianProfilePath) { |
| 180 chrome.send('createProfile', | 182 chrome.send('createProfile', |
| 181 [profileName, profileIconUrl, false, isSupervised, | 183 [profileName, profileIconUrl, createShortcut, isSupervised, |
| 182 supervisedUserId, custodianProfilePath]); | 184 supervisedUserId, custodianProfilePath]); |
| 183 }, | 185 }, |
| 184 | 186 |
| 185 /** @override */ | 187 /** @override */ |
| 186 cancelCreateProfile: function() { | 188 cancelCreateProfile: function() { |
| 187 chrome.send('cancelCreateProfile'); | 189 chrome.send('cancelCreateProfile'); |
| 188 }, | 190 }, |
| 189 | 191 |
| 190 /** @override */ | 192 /** @override */ |
| 191 cancelLoadingSupervisedUsers: function() { | 193 cancelLoadingSupervisedUsers: function() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 221 authenticateCustodian: function(emailAddress) { | 223 authenticateCustodian: function(emailAddress) { |
| 222 chrome.send('authenticateCustodian', [emailAddress]); | 224 chrome.send('authenticateCustodian', [emailAddress]); |
| 223 } | 225 } |
| 224 }; | 226 }; |
| 225 | 227 |
| 226 return { | 228 return { |
| 227 ProfileBrowserProxy: ProfileBrowserProxy, | 229 ProfileBrowserProxy: ProfileBrowserProxy, |
| 228 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, | 230 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, |
| 229 }; | 231 }; |
| 230 }); | 232 }); |
| OLD | NEW |