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

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

Issue 1901853002: Import supervised user dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md-user-manager-confirmation-page
Patch Set: Addressed comments 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
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 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 getExistingSupervisedUsers: function(profilePath) { 59 getExistingSupervisedUsers: function(profilePath) {
60 assertNotReached(); 60 assertNotReached();
61 }, 61 },
62 62
63 /** 63 /**
64 * Creates a profile. 64 * Creates a profile.
65 * @param {string} profileName Name of the new profile. 65 * @param {string} profileName Name of the new profile.
66 * @param {string} profileIconUrl URL of the selected icon of the new 66 * @param {string} profileIconUrl URL of the selected icon of the new
67 * profile. 67 * profile.
68 * @param {boolean} isSupervised True if the new profile is supervised. 68 * @param {boolean} isSupervised True if the new profile is supervised.
69 * @param {string} supervisedUserId ID of the supervised user to be
70 * imported.
69 * @param {string} custodianProfilePath Profile path of the custodian if 71 * @param {string} custodianProfilePath Profile path of the custodian if
70 * the new profile is supervised. 72 * the new profile is supervised.
71 */ 73 */
72 createProfile: function(profileName, profileIconUrl, isSupervised, 74 createProfile: function(profileName, profileIconUrl, isSupervised,
73 custodianProfilePath) { 75 supervisedUserId, custodianProfilePath) {
74 assertNotReached(); 76 assertNotReached();
75 }, 77 },
76 78
77 /** 79 /**
78 * Cancels creation of the new profile. 80 * Cancels creation of the new profile.
79 */ 81 */
80 cancelCreateProfile: function() { 82 cancelCreateProfile: function() {
81 assertNotReached(); 83 assertNotReached();
82 }, 84 },
83 85
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 chrome.send('launchGuest'); 144 chrome.send('launchGuest');
143 }, 145 },
144 146
145 /** @override */ 147 /** @override */
146 getExistingSupervisedUsers: function(profilePath) { 148 getExistingSupervisedUsers: function(profilePath) {
147 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); 149 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath);
148 }, 150 },
149 151
150 /** @override */ 152 /** @override */
151 createProfile: function(profileName, profileIconUrl, isSupervised, 153 createProfile: function(profileName, profileIconUrl, isSupervised,
152 custodianProfilePath) { 154 supervisedUserId, custodianProfilePath) {
153 chrome.send('createProfile', 155 chrome.send('createProfile',
154 [profileName, profileIconUrl, false, isSupervised, '', 156 [profileName, profileIconUrl, false, isSupervised,
155 custodianProfilePath]); 157 supervisedUserId, custodianProfilePath]);
156 }, 158 },
157 159
158 /** @override */ 160 /** @override */
159 cancelCreateProfile: function() { 161 cancelCreateProfile: function() {
160 chrome.send('cancelCreateProfile'); 162 chrome.send('cancelCreateProfile');
161 }, 163 },
162 164
163 /** @override */ 165 /** @override */
164 initializeUserManager: function(locationHash) { 166 initializeUserManager: function(locationHash) {
165 chrome.send('userManagerInitialize', [locationHash]); 167 chrome.send('userManagerInitialize', [locationHash]);
(...skipping 13 matching lines...) Expand all
179 switchToProfile: function(profilePath) { 181 switchToProfile: function(profilePath) {
180 chrome.send('switchToProfile', [profilePath]); 182 chrome.send('switchToProfile', [profilePath]);
181 } 183 }
182 }; 184 };
183 185
184 return { 186 return {
185 ProfileBrowserProxy: ProfileBrowserProxy, 187 ProfileBrowserProxy: ProfileBrowserProxy,
186 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, 188 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl,
187 }; 189 };
188 }); 190 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698