gdmUtil: make _startService support no username

commit fd11ad95f6 factored
out duplicated code, but unintentionally dropped support
for beginning verification without a username.

This commit brings it back.

https://bugzilla.gnome.org/show_bug.cgi?id=706542
This commit is contained in:
Ray Strode 2013-08-21 18:05:55 -04:00
parent 5ea75499fe
commit 9720301d01

View File

@ -381,6 +381,7 @@ const ShellUserVerifier = new Lang.Class({
_startService: function(serviceName) {
this._hold.acquire();
if (this._userName) {
this._userVerifier.call_begin_verification_for_user(serviceName,
this._userName,
this._cancellable,
@ -396,6 +397,22 @@ const ShellUserVerifier = new Lang.Class({
this._hold.release();
}));
} else {
this._userVerifier.call_begin_verification(serviceName,
this._cancellable,
Lang.bind(this, function(obj, result) {
try {
obj.call_begin_verification_finish(result);
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
return;
} catch(e) {
this._reportInitError('Failed to start verification', e);
return;
}
this._hold.release();
}));
}
},
_beginVerification: function() {