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

Side by Side Diff: chrome/browser/resources/options/managed_user_import.js

Issue 192573003: After a supervised user has been imported, close overlays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/options/options_page.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 /** 9 /**
10 * ManagedUserImportOverlay class. 10 * ManagedUserImportOverlay class.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 /** 220 /**
221 * Closes the overlay if importing the managed user was successful. Also 221 * Closes the overlay if importing the managed user was successful. Also
222 * reset the cached list of managed users in order to get an updated list 222 * reset the cached list of managed users in order to get an updated list
223 * when the overlay is reopened. 223 * when the overlay is reopened.
224 * @private 224 * @private
225 */ 225 */
226 onSuccess_: function() { 226 onSuccess_: function() {
227 this.updateImportInProgress_(false); 227 this.updateImportInProgress_(false);
228 options.ManagedUserListData.resetPromise(); 228 options.ManagedUserListData.resetPromise();
229 OptionsPage.closeOverlay(); 229 OptionsPage.closeAllOverlays();
230 }, 230 },
231 }; 231 };
232 232
233 // Forward public APIs to private implementations. 233 // Forward public APIs to private implementations.
234 [ 234 [
235 'onSuccess', 235 'onSuccess',
236 ].forEach(function(name) { 236 ].forEach(function(name) {
237 ManagedUserImportOverlay[name] = function() { 237 ManagedUserImportOverlay[name] = function() {
238 var instance = ManagedUserImportOverlay.getInstance(); 238 var instance = ManagedUserImportOverlay.getInstance();
239 return instance[name + '_'].apply(instance, arguments); 239 return instance[name + '_'].apply(instance, arguments);
240 }; 240 };
241 }); 241 });
242 242
243 // Export 243 // Export
244 return { 244 return {
245 ManagedUserImportOverlay: ManagedUserImportOverlay, 245 ManagedUserImportOverlay: ManagedUserImportOverlay,
246 }; 246 };
247 }); 247 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/options_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698