| 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, | 10 /** @typedef {{username: string, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 getExistingSupervisedUsers: function(profilePath) { | 62 getExistingSupervisedUsers: function(profilePath) { |
| 63 assertNotReached(); | 63 assertNotReached(); |
| 64 }, | 64 }, |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * Creates a profile. | 67 * Creates a profile. |
| 68 * @param {string} profileName Name of the new profile. | 68 * @param {string} profileName Name of the new profile. |
| 69 * @param {string} profileIconUrl URL of the selected icon of the new | 69 * @param {string} profileIconUrl URL of the selected icon of the new |
| 70 * profile. | 70 * profile. |
| 71 * @param {boolean} isSupervised True if the new profile is supervised. | 71 * @param {boolean} isSupervised True if the new profile is supervised. |
| 72 * @param {string} supervisedUserId ID of the supervised user to be |
| 73 * imported. |
| 72 * @param {string} custodianProfilePath Profile path of the custodian if | 74 * @param {string} custodianProfilePath Profile path of the custodian if |
| 73 * the new profile is supervised. | 75 * the new profile is supervised. |
| 74 */ | 76 */ |
| 75 createProfile: function(profileName, profileIconUrl, isSupervised, | 77 createProfile: function(profileName, profileIconUrl, isSupervised, |
| 76 custodianProfilePath) { | 78 supervisedUserId, custodianProfilePath) { |
| 77 assertNotReached(); | 79 assertNotReached(); |
| 78 }, | 80 }, |
| 79 | 81 |
| 80 /** | 82 /** |
| 81 * Cancels creation of the new profile. | 83 * Cancels creation of the new profile. |
| 82 */ | 84 */ |
| 83 cancelCreateProfile: function() { | 85 cancelCreateProfile: function() { |
| 84 assertNotReached(); | 86 assertNotReached(); |
| 85 }, | 87 }, |
| 86 | 88 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 chrome.send('launchGuest'); | 147 chrome.send('launchGuest'); |
| 146 }, | 148 }, |
| 147 | 149 |
| 148 /** @override */ | 150 /** @override */ |
| 149 getExistingSupervisedUsers: function(profilePath) { | 151 getExistingSupervisedUsers: function(profilePath) { |
| 150 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); | 152 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); |
| 151 }, | 153 }, |
| 152 | 154 |
| 153 /** @override */ | 155 /** @override */ |
| 154 createProfile: function(profileName, profileIconUrl, isSupervised, | 156 createProfile: function(profileName, profileIconUrl, isSupervised, |
| 155 custodianProfilePath) { | 157 supervisedUserId, custodianProfilePath) { |
| 156 chrome.send('createProfile', | 158 chrome.send('createProfile', |
| 157 [profileName, profileIconUrl, false, isSupervised, '', | 159 [profileName, profileIconUrl, false, isSupervised, |
| 158 custodianProfilePath]); | 160 supervisedUserId, custodianProfilePath]); |
| 159 }, | 161 }, |
| 160 | 162 |
| 161 /** @override */ | 163 /** @override */ |
| 162 cancelCreateProfile: function() { | 164 cancelCreateProfile: function() { |
| 163 chrome.send('cancelCreateProfile'); | 165 chrome.send('cancelCreateProfile'); |
| 164 }, | 166 }, |
| 165 | 167 |
| 166 /** @override */ | 168 /** @override */ |
| 167 initializeUserManager: function(locationHash) { | 169 initializeUserManager: function(locationHash) { |
| 168 chrome.send('userManagerInitialize', [locationHash]); | 170 chrome.send('userManagerInitialize', [locationHash]); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 182 switchToProfile: function(profilePath) { | 184 switchToProfile: function(profilePath) { |
| 183 chrome.send('switchToProfile', [profilePath]); | 185 chrome.send('switchToProfile', [profilePath]); |
| 184 } | 186 } |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 return { | 189 return { |
| 188 ProfileBrowserProxy: ProfileBrowserProxy, | 190 ProfileBrowserProxy: ProfileBrowserProxy, |
| 189 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, | 191 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, |
| 190 }; | 192 }; |
| 191 }); | 193 }); |
| OLD | NEW |