зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1304219 - Part 2: Update speculativeConnect() to speculativeConnect2() for Necko. r=hurley
--HG-- extra : rebase_source : 3fb68515087ec05c32108f2067c07110e10b92f8 extra : histedit_source : c12be77b0b53cf3d69343d6ee4d1a95a6d60c60c
This commit is contained in:
Родитель
fc4cdaf096
Коммит
e4414d6c1b
|
@ -972,7 +972,7 @@ Predictor::PredictForLink(nsIURI *targetURI, nsIURI *sourceURI,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mSpeculativeService->SpeculativeConnect(targetURI, nullptr);
|
mSpeculativeService->SpeculativeConnect2(targetURI, nullptr, nullptr);
|
||||||
if (verifier) {
|
if (verifier) {
|
||||||
PREDICTOR_LOG((" sending verification"));
|
PREDICTOR_LOG((" sending verification"));
|
||||||
verifier->OnPredictPreconnect(targetURI);
|
verifier->OnPredictPreconnect(targetURI);
|
||||||
|
@ -1360,7 +1360,7 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie
|
||||||
nsCOMPtr<nsIURI> uri = preconnects[i];
|
nsCOMPtr<nsIURI> uri = preconnects[i];
|
||||||
++totalPredictions;
|
++totalPredictions;
|
||||||
++totalPreconnects;
|
++totalPreconnects;
|
||||||
mSpeculativeService->SpeculativeConnect(uri, this);
|
mSpeculativeService->SpeculativeConnect2(uri, nullptr, this);
|
||||||
predicted = true;
|
predicted = true;
|
||||||
if (verifier) {
|
if (verifier) {
|
||||||
PREDICTOR_LOG((" sending preconnect verification"));
|
PREDICTOR_LOG((" sending preconnect verification"));
|
||||||
|
|
|
@ -1752,12 +1752,18 @@ IOServiceProxyCallback::OnProxyAvailable(nsICancelable *request, nsIChannel *cha
|
||||||
if (!speculativeHandler)
|
if (!speculativeHandler)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
|
||||||
|
nsCOMPtr<nsIPrincipal> principal;
|
||||||
|
if (loadInfo) {
|
||||||
|
principal = loadInfo->LoadingPrincipal();
|
||||||
|
}
|
||||||
|
|
||||||
nsLoadFlags loadFlags = 0;
|
nsLoadFlags loadFlags = 0;
|
||||||
channel->GetLoadFlags(&loadFlags);
|
channel->GetLoadFlags(&loadFlags);
|
||||||
if (loadFlags & nsIRequest::LOAD_ANONYMOUS) {
|
if (loadFlags & nsIRequest::LOAD_ANONYMOUS) {
|
||||||
speculativeHandler->SpeculativeAnonymousConnect(uri, mCallbacks);
|
speculativeHandler->SpeculativeAnonymousConnect2(uri, principal, mCallbacks);
|
||||||
} else {
|
} else {
|
||||||
speculativeHandler->SpeculativeConnect(uri, mCallbacks);
|
speculativeHandler->SpeculativeConnect2(uri, principal, mCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче