| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 (viewportDescriptionWrapper && viewportDescriptionWrapper->set) | 405 (viewportDescriptionWrapper && viewportDescriptionWrapper->set) |
| 406 ? &(viewportDescriptionWrapper->description) | 406 ? &(viewportDescriptionWrapper->description) |
| 407 : nullptr; | 407 : nullptr; |
| 408 | 408 |
| 409 preloadIfNeeded(relAttribute, url, *document, header.as(), | 409 preloadIfNeeded(relAttribute, url, *document, header.as(), |
| 410 header.mimeType(), header.media(), | 410 header.mimeType(), header.media(), |
| 411 crossOriginAttributeValue(header.crossOrigin()), | 411 crossOriginAttributeValue(header.crossOrigin()), |
| 412 LinkCalledFromHeader, errorOccurred, viewportDescription, | 412 LinkCalledFromHeader, errorOccurred, viewportDescription, |
| 413 ReferrerPolicyDefault); | 413 ReferrerPolicyDefault); |
| 414 } | 414 } |
| 415 if (relAttribute.isServiceWorker()) { |
| 416 UseCounter::count(*document, UseCounter::LinkHeaderServiceWorker); |
| 417 } |
| 415 // TODO(yoav): Add more supported headers as needed. | 418 // TODO(yoav): Add more supported headers as needed. |
| 416 } | 419 } |
| 417 } | 420 } |
| 418 | 421 |
| 419 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, | 422 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, |
| 420 CrossOriginAttributeValue crossOrigin, | 423 CrossOriginAttributeValue crossOrigin, |
| 421 const String& type, | 424 const String& type, |
| 422 const String& as, | 425 const String& as, |
| 423 const String& media, | 426 const String& media, |
| 424 ReferrerPolicy referrerPolicy, | 427 ReferrerPolicy referrerPolicy, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 480 |
| 478 DEFINE_TRACE(LinkLoader) { | 481 DEFINE_TRACE(LinkLoader) { |
| 479 visitor->trace(m_client); | 482 visitor->trace(m_client); |
| 480 visitor->trace(m_prerender); | 483 visitor->trace(m_prerender); |
| 481 visitor->trace(m_linkPreloadResourceClient); | 484 visitor->trace(m_linkPreloadResourceClient); |
| 482 ResourceOwner<Resource, ResourceClient>::trace(visitor); | 485 ResourceOwner<Resource, ResourceClient>::trace(visitor); |
| 483 PrerenderClient::trace(visitor); | 486 PrerenderClient::trace(visitor); |
| 484 } | 487 } |
| 485 | 488 |
| 486 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |