mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 881804 (part 5) - Plumb image loader into predictive network actions. r=seth
This commit is contained in:
parent
d45e44771a
commit
3b785b7ae2
@ -29,6 +29,7 @@
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsINetworkSeer.h"
|
||||
|
||||
#include "nsIApplicationCache.h"
|
||||
#include "nsIApplicationCacheContainer.h"
|
||||
@ -1238,6 +1239,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());
|
||||
@ -1735,6 +1739,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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user