| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 continue; | 315 continue; |
| 316 if (mediaPolicy == OnlyLoadNonMedia && !header.media().isEmpty()) | 316 if (mediaPolicy == OnlyLoadNonMedia && !header.media().isEmpty()) |
| 317 continue; | 317 continue; |
| 318 | 318 |
| 319 LinkRelAttribute relAttribute(header.rel()); | 319 LinkRelAttribute relAttribute(header.rel()); |
| 320 KURL url(baseURL, header.url()); | 320 KURL url(baseURL, header.url()); |
| 321 // Sanity check to avoid re-entrancy here. | 321 // Sanity check to avoid re-entrancy here. |
| 322 if (url == baseURL) | 322 if (url == baseURL) |
| 323 continue; | 323 continue; |
| 324 if (canLoadResources != OnlyLoadResources) { | 324 if (canLoadResources != OnlyLoadResources) { |
| 325 if (RuntimeEnabledFeatures::linkHeaderEnabled()) | 325 dnsPrefetchIfNeeded(relAttribute, url, *document, networkHintsInterf
ace, LinkCalledFromHeader); |
| 326 dnsPrefetchIfNeeded(relAttribute, url, *document, networkHintsIn
terface, LinkCalledFromHeader); | |
| 327 | 326 |
| 328 if (RuntimeEnabledFeatures::linkPreconnectEnabled()) | 327 if (RuntimeEnabledFeatures::linkPreconnectEnabled()) |
| 329 preconnectIfNeeded(relAttribute, url, *document, crossOriginAttr
ibuteValue(header.crossOrigin()), networkHintsInterface, LinkCalledFromHeader); | 328 preconnectIfNeeded(relAttribute, url, *document, crossOriginAttr
ibuteValue(header.crossOrigin()), networkHintsInterface, LinkCalledFromHeader); |
| 330 } | 329 } |
| 331 if (canLoadResources != DoNotLoadResources) { | 330 if (canLoadResources != DoNotLoadResources) { |
| 332 bool errorOccurred = false; | 331 bool errorOccurred = false; |
| 333 if (RuntimeEnabledFeatures::linkPreloadEnabled()) { | 332 if (RuntimeEnabledFeatures::linkPreloadEnabled()) { |
| 334 ViewportDescription* viewportDescription = (viewportDescriptionW
rapper && viewportDescriptionWrapper->set) ? &(viewportDescriptionWrapper->descr
iption) : nullptr; | 333 ViewportDescription* viewportDescription = (viewportDescriptionW
rapper && viewportDescriptionWrapper->set) ? &(viewportDescriptionWrapper->descr
iption) : nullptr; |
| 335 preloadIfNeeded(relAttribute, url, *document, header.as(), heade
r.mimeType(), header.media(), crossOriginAttributeValue(header.crossOrigin()), L
inkCalledFromHeader, errorOccurred, viewportDescription); | 334 preloadIfNeeded(relAttribute, url, *document, header.as(), heade
r.mimeType(), header.media(), crossOriginAttributeValue(header.crossOrigin()), L
inkCalledFromHeader, errorOccurred, viewportDescription); |
| 336 } | 335 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 DEFINE_TRACE(LinkLoader) | 400 DEFINE_TRACE(LinkLoader) |
| 402 { | 401 { |
| 403 visitor->trace(m_client); | 402 visitor->trace(m_client); |
| 404 visitor->trace(m_prerender); | 403 visitor->trace(m_prerender); |
| 405 visitor->trace(m_linkPreloadResourceClient); | 404 visitor->trace(m_linkPreloadResourceClient); |
| 406 ResourceOwner<Resource, ResourceClient>::trace(visitor); | 405 ResourceOwner<Resource, ResourceClient>::trace(visitor); |
| 407 PrerenderClient::trace(visitor); | 406 PrerenderClient::trace(visitor); |
| 408 } | 407 } |
| 409 | 408 |
| 410 } // namespace blink | 409 } // namespace blink |
| OLD | NEW |