Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| index 98043161ced3d6f7e13f09d89c9b864899bb2490..7a7ef0287647b31e51be1d441fc14782ce0f089e 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| @@ -85,6 +85,7 @@ |
| #include "core/xml/parser/XMLDocumentParser.h" |
| #include "platform/Logging.h" |
| #include "platform/PluginScriptForbiddenScope.h" |
| +#include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/ScriptForbiddenScope.h" |
| #include "platform/TraceEvent.h" |
| #include "platform/UserGestureIndicator.h" |
| @@ -514,6 +515,16 @@ void FrameLoader::didBeginDocument() |
| OriginTrialContext::addTokensFromHeader(m_frame->document(), m_documentLoader->response().httpHeaderField(HTTPNames::Origin_Trial)); |
| } |
| + if (m_documentLoader && RuntimeEnabledFeatures::referrerPolicyHeaderEnabled()) { |
| + String referrerPolicyHeader = m_documentLoader->response().httpHeaderField(HTTPNames::Referrer_Policy); |
| + if (!referrerPolicyHeader.isNull()) { |
| + ReferrerPolicy referrerPolicy = parseReferrerPolicyHeader(referrerPolicyHeader); |
|
Mike West
2016/06/21 07:40:03
Could you call `Document::processReferrerPolicy(re
estark
2016/06/21 17:41:33
Hmm. If I put the new parsing code in Document::pr
Mike West
2016/06/22 18:57:04
I trust your judgement. I think it's probably reas
|
| + if (referrerPolicy != ReferrerPolicyDefault) { |
| + m_frame->document()->setReferrerPolicy(referrerPolicy); |
| + } |
| + } |
| + } |
| + |
| client()->didCreateNewDocument(); |
| } |