Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index a1c645fb4b0399c60eaeb0e5e602987fa003714d..ad451f6d68a650323d4397fcd80b57edbd11a929 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -465,7 +465,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC |
| , m_loadEventDelayCount(0) |
| , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired) |
| , m_pluginLoadingTimer(this, &Document::pluginLoadingTimerFired) |
| - , m_referrerPolicy(ReferrerPolicyDefault) |
| , m_writeRecursionIsTooDeep(false) |
| , m_writeRecursionDepth(0) |
| , m_taskRunner(MainThreadTaskRunner::create(this)) |
| @@ -3065,14 +3064,14 @@ void Document::processReferrerPolicy(const String& policy) |
| addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMessageLevel, "Failed to set referrer policy: The value '" + policy + "' is not one of 'always', 'default', 'never', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-crossorigin', or 'unsafe-url'. This document's referrer policy has been left unchanged.")); |
| } |
| -void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) |
| +void Document::setReferrerPolicy(ReferrerPolicy policy) |
| { |
| // FIXME: Can we adopt the CSP referrer policy merge algorithm? Or does the web rely on being able to modify the referrer policy in-flight? |
| UseCounter::count(this, UseCounter::SetReferrerPolicy); |
| - if (m_referrerPolicy != ReferrerPolicyDefault) |
| + if (referrerPolicy() != ReferrerPolicyDefault) |
| UseCounter::count(this, UseCounter::ResetReferrerPolicy); |
| - m_referrerPolicy = referrerPolicy; |
| + ExecutionContext::setReferrerPolicy(policy); |
|
Mike West
2015/05/01 14:34:29
Isn't `Document` an `ExecutionContext`? Can't we j
estark
2015/05/01 18:19:55
Oh ok, yeah, that works. I wasn't sure if we wante
|
| } |
| String Document::outgoingReferrer() |