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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 2278823004: Stop supporting legacy keywords in Referrer-Policy header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jochen comment Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann <hausmann@kde.org> 4 * (C) 2000 Simon Hausmann <hausmann@kde.org>
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 // Schedule the ping before the frame load. Prerender in Chrome may kill the renderer as soon as the navigation is 415 // Schedule the ping before the frame load. Prerender in Chrome may kill the renderer as soon as the navigation is
416 // sent out. 416 // sent out.
417 sendPings(completedURL); 417 sendPings(completedURL);
418 418
419 ResourceRequest request(completedURL); 419 ResourceRequest request(completedURL);
420 request.setUIStartTime(event->platformTimeStamp()); 420 request.setUIStartTime(event->platformTimeStamp());
421 request.setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy::Re portLink); 421 request.setInputPerfMetricReportPolicy(InputToLoadPerfMetricReportPolicy::Re portLink);
422 422
423 ReferrerPolicy policy; 423 ReferrerPolicy policy;
424 if (hasAttribute(referrerpolicyAttr) && SecurityPolicy::referrerPolicyFromSt ring(fastGetAttribute(referrerpolicyAttr), &policy) && !hasRel(RelationNoReferre r)) { 424 if (hasAttribute(referrerpolicyAttr) && SecurityPolicy::referrerPolicyFromSt ringWithLegacyKeywords(fastGetAttribute(referrerpolicyAttr), &policy) && !hasRel (RelationNoReferrer)) {
425 request.setHTTPReferrer(SecurityPolicy::generateReferrer(policy, complet edURL, document().outgoingReferrer())); 425 request.setHTTPReferrer(SecurityPolicy::generateReferrer(policy, complet edURL, document().outgoingReferrer()));
426 } 426 }
427 427
428 if (hasAttribute(downloadAttr)) { 428 if (hasAttribute(downloadAttr)) {
429 request.setRequestContext(WebURLRequest::RequestContextDownload); 429 request.setRequestContext(WebURLRequest::RequestContextDownload);
430 bool isSameOrigin = completedURL.protocolIsData() || document().getSecur ityOrigin()->canRequest(completedURL); 430 bool isSameOrigin = completedURL.protocolIsData() || document().getSecur ityOrigin()->canRequest(completedURL);
431 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow nloadAttr) : nullAtom); 431 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow nloadAttr) : nullAtom);
432 432
433 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow nload, suggestedName, false); 433 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow nload, suggestedName, false);
434 } else { 434 } else {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 476 }
477 477
478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint Sender() 478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint Sender()
479 { 479 {
480 if (!m_navigationHintSender) 480 if (!m_navigationHintSender)
481 m_navigationHintSender = NavigationHintSender::create(this); 481 m_navigationHintSender = NavigationHintSender::create(this);
482 return m_navigationHintSender; 482 return m_navigationHintSender;
483 } 483 }
484 484
485 } // namespace blink 485 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698