Bug 812528 - Port speculativeConnect changes to search.xml from bug 804655 and bug 722979. r=Neil

This commit is contained in:
Jens Hatlak 2012-11-18 19:29:30 +01:00
Родитель f4cbd60338
Коммит a85367303f
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -487,13 +487,16 @@
var engine = this.currentEngine;
var connector = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsISpeculativeConnect);
var callbacks = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsILoadContext);
var searchURI = engine.getSubmission("dummy").uri;
connector.speculativeConnect(searchURI, null);
connector.speculativeConnect(searchURI, callbacks);
if (engine.supportsResponseType(SUGGEST_TYPE)) {
var suggestURI = engine.getSubmission("dummy", SUGGEST_TYPE).uri;
if (suggestURI.prePath != searchURI.prePath)
connector.speculativeConnect(suggestURI, null);
connector.speculativeConnect(suggestURI, callbacks);
}
]]></handler>
</handlers>