зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881804 (part 2) - Plumb docshell into predictive network actions. r=smaug
This commit is contained in:
Родитель
aa92fb5ac6
Коммит
26ad4af46d
|
@ -117,6 +117,7 @@
|
|||
#include "nsIFaviconService.h"
|
||||
#include "mozIAsyncFavicons.h"
|
||||
#endif
|
||||
#include "nsINetworkSeer.h"
|
||||
|
||||
// Editor-related
|
||||
#include "nsIEditingSession.h"
|
||||
|
@ -6977,9 +6978,12 @@ nsDocShell::EndPageLoad(nsIWebProgress * aProgress,
|
|||
aStatus = NS_ERROR_OFFLINE;
|
||||
DisplayLoadError(aStatus, url, nullptr, aChannel);
|
||||
}
|
||||
} // if we have a host
|
||||
} // if we have a host
|
||||
else if (url && NS_SUCCEEDED(aStatus)) {
|
||||
mozilla::net::SeerLearnRedirect(url, aChannel, this);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -9378,6 +9382,9 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||
else
|
||||
srcdoc = NullString();
|
||||
|
||||
mozilla::net::SeerPredict(aURI, nullptr, nsINetworkSeer::PREDICT_LOAD,
|
||||
this, nullptr);
|
||||
|
||||
nsCOMPtr<nsIRequest> req;
|
||||
rv = DoURILoad(aURI, aReferrer,
|
||||
!(aFlags & INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER),
|
||||
|
@ -12459,6 +12466,9 @@ nsDocShell::OnOverLink(nsIContent* aContent,
|
|||
rv = textToSubURI->UnEscapeURIForUI(charset, spec, uStr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mozilla::net::SeerPredict(aURI, mCurrentURI, nsINetworkSeer::PREDICT_LINK,
|
||||
this, nullptr);
|
||||
|
||||
if (browserChrome2) {
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aContent);
|
||||
rv = browserChrome2->SetStatusWithContext(nsIWebBrowserChrome::STATUS_LINK,
|
||||
|
|
Загрузка…
Ссылка в новой задаче