| Index: third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| index 99a69abd80c5d91dbfa50940d6349e3128c9d305..2a50566ab9cd193f484417431ba01d408297276e 100644
|
| --- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
| @@ -52,8 +52,6 @@ CSPDirectiveList::CSPDirectiveList(ContentSecurityPolicy* policy,
|
| m_headerType(type),
|
| m_headerSource(source),
|
| m_hasSandboxPolicy(false),
|
| - m_didSetReferrerPolicy(false),
|
| - m_referrerPolicy(ReferrerPolicyDefault),
|
| m_strictMixedContentCheckingEnforced(false),
|
| m_upgradeInsecureRequests(false),
|
| m_treatAsPublicAddress(false),
|
| @@ -1070,54 +1068,6 @@ void CSPDirectiveList::enableInsecureRequestsUpgrade(const String& name,
|
| m_policy->reportValueForEmptyDirective(name, value);
|
| }
|
|
|
| -void CSPDirectiveList::parseReferrer(const String& name, const String& value) {
|
| - m_didSetReferrerPolicy = true;
|
| -
|
| - if (value.isEmpty()) {
|
| - m_policy->reportInvalidReferrer(value);
|
| - m_referrerPolicy = ReferrerPolicyNever;
|
| - return;
|
| - }
|
| -
|
| - Vector<UChar> characters;
|
| - value.appendTo(characters);
|
| -
|
| - const UChar* position = characters.data();
|
| - const UChar* end = position + characters.size();
|
| -
|
| - skipWhile<UChar, isASCIISpace>(position, end);
|
| - const UChar* begin = position;
|
| - skipWhile<UChar, isNotASCIISpace>(position, end);
|
| -
|
| - StringView token(begin, position - begin);
|
| -
|
| - // value1
|
| - // ^
|
| - if (equalIgnoringCase("unsafe-url", token)) {
|
| - m_referrerPolicy = ReferrerPolicyAlways;
|
| - } else if (equalIgnoringCase("no-referrer", token)) {
|
| - m_referrerPolicy = ReferrerPolicyNever;
|
| - } else if (equalIgnoringCase("no-referrer-when-downgrade", token)) {
|
| - m_referrerPolicy = ReferrerPolicyDefault;
|
| - } else if (equalIgnoringCase("origin", token)) {
|
| - m_referrerPolicy = ReferrerPolicyOrigin;
|
| - } else if (equalIgnoringCase("origin-when-cross-origin", token) ||
|
| - equalIgnoringCase("origin-when-crossorigin", token)) {
|
| - m_referrerPolicy = ReferrerPolicyOriginWhenCrossOrigin;
|
| - } else {
|
| - m_policy->reportInvalidReferrer(value);
|
| - return;
|
| - }
|
| -
|
| - skipWhile<UChar, isASCIISpace>(position, end);
|
| - if (position == end)
|
| - return;
|
| -
|
| - // value1 value2
|
| - // ^
|
| - m_policy->reportInvalidReferrer(value);
|
| -}
|
| -
|
| void CSPDirectiveList::addDirective(const String& name, const String& value) {
|
| ASSERT(!name.isEmpty());
|
|
|
| @@ -1160,8 +1110,6 @@ void CSPDirectiveList::addDirective(const String& name, const String& value) {
|
| setCSPDirective<SourceListDirective>(name, value, m_formAction);
|
| } else if (equalIgnoringCase(name, ContentSecurityPolicy::PluginTypes)) {
|
| setCSPDirective<MediaListDirective>(name, value, m_pluginTypes);
|
| - } else if (equalIgnoringCase(name, ContentSecurityPolicy::Referrer)) {
|
| - parseReferrer(name, value);
|
| } else if (equalIgnoringCase(
|
| name, ContentSecurityPolicy::UpgradeInsecureRequests)) {
|
| enableInsecureRequestsUpgrade(name, value);
|
|
|