OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 processFragment(url, NavigationWithinSameDocument); | 697 processFragment(url, NavigationWithinSameDocument); |
698 checkCompleted(); | 698 checkCompleted(); |
699 | 699 |
700 m_frame->localDOMWindow()->statePopped(stateObject ? stateObject : Serialize
dScriptValue::nullValue()); | 700 m_frame->localDOMWindow()->statePopped(stateObject ? stateObject : Serialize
dScriptValue::nullValue()); |
701 } | 701 } |
702 | 702 |
703 void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
dReferrer shouldSendReferrer, Document* originDocument) | 703 void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
dReferrer shouldSendReferrer, Document* originDocument) |
704 { | 704 { |
705 if (!originDocument) | 705 if (!originDocument) |
706 return; | 706 return; |
707 // FIXME: This should be an assertion, but there's some plugin code in the c
hromium repo | 707 // Anchor elements with the 'referrerpolicy' attribute will have |
708 // that both determines its own referrer and expects to be associated with a
n originDocument. | 708 // already set the referrer on the request. |
709 if (!request.httpReferrer().isEmpty()) | 709 if (request.didSetHTTPReferrer()) |
710 return; | 710 return; |
711 if (shouldSendReferrer == NeverSendReferrer) | 711 if (shouldSendReferrer == NeverSendReferrer) |
712 return; | 712 return; |
713 | 713 |
714 // Always use the initiating document to generate the referrer. | 714 // Always use the initiating document to generate the referrer. |
715 // We need to generateReferrer(), because we haven't enforced ReferrerPolicy
or https->http | 715 // We need to generateReferrer(), because we haven't enforced ReferrerPolicy
or https->http |
716 // referrer suppression yet. | 716 // referrer suppression yet. |
717 Referrer referrer = SecurityPolicy::generateReferrer(originDocument->referre
rPolicy(), request.url(), originDocument->outgoingReferrer()); | 717 Referrer referrer = SecurityPolicy::generateReferrer(originDocument->referre
rPolicy(), request.url(), originDocument->outgoingReferrer()); |
718 | 718 |
719 request.setHTTPReferrer(referrer); | 719 request.setHTTPReferrer(referrer); |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 // FIXME: We need a way to propagate insecure requests policy flags to | 1488 // FIXME: We need a way to propagate insecure requests policy flags to |
1489 // out-of-process frames. For now, we'll always use default behavior. | 1489 // out-of-process frames. For now, we'll always use default behavior. |
1490 if (!parentFrame->isLocalFrame()) | 1490 if (!parentFrame->isLocalFrame()) |
1491 return nullptr; | 1491 return nullptr; |
1492 | 1492 |
1493 ASSERT(toLocalFrame(parentFrame)->document()); | 1493 ASSERT(toLocalFrame(parentFrame)->document()); |
1494 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1494 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1495 } | 1495 } |
1496 | 1496 |
1497 } // namespace blink | 1497 } // namespace blink |
OLD | NEW |