* }
* @private
*/
- SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ = function(
- supervisedUsers) {
+ SupervisedUserListData.prototype.receiveExistingSupervisedUsers_ =
+ function(supervisedUsers) {
if (!this.promise_) {
this.onDataChanged_(supervisedUsers);
return;
* @private
*/
SupervisedUserListData.prototype.onSigninError_ = function() {
- assert(this.promise_);
+ if (!this.promise_) {
+ return;
+ }
this.reject_();
this.resetPromise_();
};
};
// Forward public APIs to private implementations.
- [
+ cr.makePublic(SupervisedUserListData, [
'addObserver',
'onSigninError',
'receiveExistingSupervisedUsers',
'removeObserver',
'requestExistingSupervisedUsers',
'resetPromise',
- ].forEach(function(name) {
- SupervisedUserListData[name] = function() {
- var instance = SupervisedUserListData.getInstance();
- return instance[name + '_'].apply(instance, arguments);
- };
- });
+ ]);
// Export
return {