Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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.closeOverlay(); |
| 230 // Also close the create profile overlay. | |
| 231 OptionsPage.closeOverlay(); | |
|
Bernhard Bauer
2014/03/10 10:25:19
It seems somewhat brittle that we close the two fr
Adrian Kuegel
2014/03/10 10:28:52
Yes, I think that is the functionality we actually
Bernhard Bauer
2014/03/10 10:37:36
Yesplz :)
It shouldn't be too difficult; just clo
Adrian Kuegel
2014/03/10 10:39:07
Done.
| |
| 230 }, | 232 }, |
| 231 }; | 233 }; |
| 232 | 234 |
| 233 // Forward public APIs to private implementations. | 235 // Forward public APIs to private implementations. |
| 234 [ | 236 [ |
| 235 'onSuccess', | 237 'onSuccess', |
| 236 ].forEach(function(name) { | 238 ].forEach(function(name) { |
| 237 ManagedUserImportOverlay[name] = function() { | 239 ManagedUserImportOverlay[name] = function() { |
| 238 var instance = ManagedUserImportOverlay.getInstance(); | 240 var instance = ManagedUserImportOverlay.getInstance(); |
| 239 return instance[name + '_'].apply(instance, arguments); | 241 return instance[name + '_'].apply(instance, arguments); |
| 240 }; | 242 }; |
| 241 }); | 243 }); |
| 242 | 244 |
| 243 // Export | 245 // Export |
| 244 return { | 246 return { |
| 245 ManagedUserImportOverlay: ManagedUserImportOverlay, | 247 ManagedUserImportOverlay: ManagedUserImportOverlay, |
| 246 }; | 248 }; |
| 247 }); | 249 }); |
| OLD | NEW |