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

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 + rebase 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 getExistingSupervisedUsers: function(profilePath) { 55 getExistingSupervisedUsers: function(profilePath) {
56 assertNotReached(); 56 assertNotReached();
57 }, 57 },
58 58
59 /** 59 /**
60 * Creates a profile. 60 * Creates a profile.
61 * @param {string} profileName Name of the new profile. 61 * @param {string} profileName Name of the new profile.
62 * @param {string} profileIconUrl URL of the selected icon of the new 62 * @param {string} profileIconUrl URL of the selected icon of the new
63 * profile. 63 * profile.
64 * @param {boolean} isSupervised True if the new profile is supervised. 64 * @param {boolean} isSupervised True if the new profile is supervised.
65 * @param {string} supervisedUserId ID of the supervised user to be
66 * imported.
65 * @param {string} custodianProfilePath Profile path of the custodian if 67 * @param {string} custodianProfilePath Profile path of the custodian if
66 * the new profile is supervised. 68 * the new profile is supervised.
67 */ 69 */
68 createProfile: function(profileName, profileIconUrl, isSupervised, 70 createProfile: function(profileName, profileIconUrl, isSupervised,
69 custodianProfilePath) { 71 supervisedUserId, custodianProfilePath) {
70 assertNotReached(); 72 assertNotReached();
71 }, 73 },
72 74
73 /** 75 /**
74 * Cancels creation of the new profile. 76 * Cancels creation of the new profile.
75 */ 77 */
76 cancelCreateProfile: function() { 78 cancelCreateProfile: function() {
77 assertNotReached(); 79 assertNotReached();
78 }, 80 },
79 81
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 chrome.send('launchGuest'); 132 chrome.send('launchGuest');
131 }, 133 },
132 134
133 /** @override */ 135 /** @override */
134 getExistingSupervisedUsers: function(profilePath) { 136 getExistingSupervisedUsers: function(profilePath) {
135 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); 137 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath);
136 }, 138 },
137 139
138 /** @override */ 140 /** @override */
139 createProfile: function(profileName, profileIconUrl, isSupervised, 141 createProfile: function(profileName, profileIconUrl, isSupervised,
140 custodianProfilePath) { 142 supervisedUserId, custodianProfilePath) {
141 chrome.send('createProfile', 143 chrome.send('createProfile',
142 [profileName, profileIconUrl, false, isSupervised, '', 144 [profileName, profileIconUrl, false, isSupervised,
143 custodianProfilePath]); 145 supervisedUserId, custodianProfilePath]);
144 }, 146 },
145 147
146 /** @override */ 148 /** @override */
147 cancelCreateProfile: function() { 149 cancelCreateProfile: function() {
148 chrome.send('cancelCreateProfile'); 150 chrome.send('cancelCreateProfile');
149 }, 151 },
150 152
151 /** @override */ 153 /** @override */
152 initializeUserManager: function(locationHash) { 154 initializeUserManager: function(locationHash) {
153 chrome.send('userManagerInitialize', [locationHash]); 155 chrome.send('userManagerInitialize', [locationHash]);
154 }, 156 },
155 157
156 /** @override */ 158 /** @override */
157 launchUser: function(profilePath) { 159 launchUser: function(profilePath) {
158 chrome.send('launchUser', [profilePath]); 160 chrome.send('launchUser', [profilePath]);
159 }, 161 },
160 162
161 /** @override */ 163 /** @override */
162 openUrlInLastActiveProfileBrowser: function(url) { 164 openUrlInLastActiveProfileBrowser: function(url) {
163 chrome.send('openUrlInLastActiveProfileBrowser', [url]); 165 chrome.send('openUrlInLastActiveProfileBrowser', [url]);
164 }, 166 },
165 }; 167 };
166 168
167 return { 169 return {
168 ProfileBrowserProxy: ProfileBrowserProxy, 170 ProfileBrowserProxy: ProfileBrowserProxy,
169 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, 171 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl,
170 }; 172 };
171 }); 173 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698