Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1100)

Unified Diff: Source/core/loader/LinkLoader.cpp

Issue 23833004: Have LinkLoader::loadLink() take a Document reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/LinkLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/LinkLoader.cpp
diff --git a/Source/core/loader/LinkLoader.cpp b/Source/core/loader/LinkLoader.cpp
index 73103fa53109bd3bbe406a79b2c62d442854c439..2e49672fdfdca4b17a2f639d3c8543ddd68fe3a5 100644
--- a/Source/core/loader/LinkLoader.cpp
+++ b/Source/core/loader/LinkLoader.cpp
@@ -104,36 +104,36 @@ void LinkLoader::didSendDOMContentLoadedForPrerender()
m_client->didSendDOMContentLoadedForLinkPrerender();
}
-bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type, const KURL& href, Document* document)
+bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type, const KURL& href, Document& document)
{
if (relAttribute.isDNSPrefetch()) {
- Settings* settings = document->settings();
+ Settings* settings = document.settings();
// FIXME: The href attribute of the link element can be in "//hostname" form, and we shouldn't attempt
// to complete that as URL <https://bugs.webkit.org/show_bug.cgi?id=48857>.
if (settings && settings->dnsPrefetchingEnabled() && href.isValid() && !href.isEmpty())
prefetchDNS(href.host());
}
- if ((relAttribute.isLinkPrefetch() || relAttribute.isLinkSubresource()) && href.isValid() && document->frame()) {
+ if ((relAttribute.isLinkPrefetch() || relAttribute.isLinkSubresource()) && href.isValid() && document.frame()) {
if (!m_client->shouldLoadLink())
return false;
Resource::Type type = relAttribute.isLinkSubresource() ? Resource::LinkSubresource : Resource::LinkPrefetch;
- FetchRequest linkRequest(ResourceRequest(document->completeURL(href)), FetchInitiatorTypeNames::link);
+ FetchRequest linkRequest(ResourceRequest(document.completeURL(href)), FetchInitiatorTypeNames::link);
if (m_cachedLinkResource) {
m_cachedLinkResource->removeClient(this);
m_cachedLinkResource = 0;
}
- m_cachedLinkResource = document->fetcher()->fetchLinkResource(type, linkRequest);
+ m_cachedLinkResource = document.fetcher()->fetchLinkResource(type, linkRequest);
if (m_cachedLinkResource)
m_cachedLinkResource->addClient(this);
}
if (relAttribute.isLinkPrerender()) {
if (!m_prerenderHandle) {
- m_prerenderHandle = document->prerenderer()->render(this, href);
+ m_prerenderHandle = document.prerenderer()->render(this, href);
} else if (m_prerenderHandle->url() != href) {
m_prerenderHandle->cancel();
- m_prerenderHandle = document->prerenderer()->render(this, href);
+ m_prerenderHandle = document.prerenderer()->render(this, href);
}
} else if (m_prerenderHandle) {
m_prerenderHandle->cancel();
« no previous file with comments | « Source/core/loader/LinkLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698