mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 369180: override nsIAuthPromptProvider implementation on search suggestion callbacks to avoid proxy authentication dialog popping up while entering text in the search bar, r=mayhemer
--HG-- extra : rebase_source : e662bf239ad508f911f213ef9de61bdd0abbef8a
This commit is contained in:
parent
4bb26ad35c
commit
a145ce4afa
@ -464,6 +464,7 @@ SuggestAutoComplete.prototype = {
|
||||
this._suggestURI = submission.uri;
|
||||
var method = (submission.postData ? "POST" : "GET");
|
||||
this._request.open(method, this._suggestURI.spec, true);
|
||||
this._request.channel.notificationCallbacks = new AuthPromptOverride();
|
||||
if (this._request.channel instanceof Ci.nsIPrivateBrowsingChannel) {
|
||||
this._request.channel.setPrivate(privacyMode);
|
||||
}
|
||||
@ -523,6 +524,31 @@ SuggestAutoComplete.prototype = {
|
||||
Ci.nsIAutoCompleteObserver])
|
||||
};
|
||||
|
||||
function AuthPromptOverride() {
|
||||
}
|
||||
AuthPromptOverride.prototype = {
|
||||
// nsIAuthPromptProvider
|
||||
getAuthPrompt: function (reason, iid) {
|
||||
// Return a no-op nsIAuthPrompt2 implementation.
|
||||
return {
|
||||
promptAuth: function () {
|
||||
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
|
||||
},
|
||||
asyncPromptAuth: function () {
|
||||
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
// nsIInterfaceRequestor
|
||||
getInterface: function SSLL_getInterface(iid) {
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
// nsISupports
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAuthPromptProvider,
|
||||
Ci.nsIInterfaceRequestor])
|
||||
};
|
||||
/**
|
||||
* SearchSuggestAutoComplete is a service implementation that handles suggest
|
||||
* results specific to web searches.
|
||||
|
Loading…
Reference in New Issue
Block a user