Bug 881804 (part 5) - Plumb image loader into predictive network actions. r=seth

This commit is contained in:
Nicholas Hurley 2013-09-20 15:24:07 -07:00
Родитель 4820e263a7
Коммит 10d8f1725c
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -28,6 +28,7 @@
#include "nsIFileURL.h"
#include "nsCRT.h"
#include "nsIDocument.h"
#include "nsINetworkSeer.h"
#include "nsIApplicationCache.h"
#include "nsIApplicationCacheContainer.h"
@ -1243,6 +1244,9 @@ bool imgLoader::ValidateRequestWithNewChannel(imgRequest *request,
// Add the proxy without notifying
hvc->AddProxy(proxy);
mozilla::net::SeerLearn(aURI, aInitialDocumentURI,
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE, aLoadGroup);
rv = newChannel->AsyncOpen(listener, nullptr);
if (NS_SUCCEEDED(rv))
NS_ADDREF(*aProxyRequest = req.get());
@ -1719,6 +1723,9 @@ nsresult imgLoader::LoadImage(nsIURI *aURI,
PR_LOG(GetImgLog(), PR_LOG_DEBUG,
("[this=%p] imgLoader::LoadImage -- Calling channel->AsyncOpen()\n", this));
mozilla::net::SeerLearn(aURI, aInitialDocumentURI,
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE, aLoadGroup);
nsresult openRes = newChannel->AsyncOpen(listener, nullptr);
if (NS_FAILED(openRes)) {