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

Issue 2075053003: Add basic Referrer-Policy support for Documents (Closed)

Created:
4 years, 6 months ago by estark
Modified:
4 years, 6 months ago
CC:
Mike West, blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add basic Referrer-Policy support for Documents This CL adds (runtime-enabled) support for the Referrer-Policy header, currently only supported for Documents. Intent to Implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Umj9iVRJM70 BUG=619228 Committed: https://crrev.com/b89eeea12cc26b0164a89398b6c3e519b3d9fa4f Cr-Commit-Position: refs/heads/master@{#401709}

Patch Set 1 #

Patch Set 2 : add crbug for TODO #

Total comments: 5

Patch Set 3 : move parsing logic to ExecutionContext::parseAndSetReferrerPolicy #

Patch Set 4 : cleanup #

Patch Set 5 : rebase #

Patch Set 6 : update test expectation for tweaked console message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -20 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-invalid-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-cross-origin-with-origin.php View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-cross-origin-with-origin-when-cross-origin.php View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-downgrade-with-no-referrer-when-downgrade.https.php View 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-no-downgrade-with-no-referrer-when-downgrade.https.php View 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-no-referrer.php View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-same-origin-with-origin.php View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-same-origin-with-origin-when-cross-origin.php View 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/basic-header-unsafe-url.https.php View 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php View 1 chunk +19 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/header-test.js View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/postmessage-referrer.html View 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentTest.cpp View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.cpp View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMetaElement-in.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPNames.in View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
estark
jochen, PTAL? cc mkwst because why not
4 years, 6 months ago (2016-06-17 23:39:46 UTC) #2
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-21 07:37:26 UTC) #3
Mike West
LGTM % one organizational question. https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php File third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php (right): https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php#newcode6 third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php:6: <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline' ...
4 years, 6 months ago (2016-06-21 07:40:03 UTC) #5
estark
https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php File third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php (right): https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php#newcode6 third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/referrer-policy-header-then-csp.php:6: <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline' *; child-src *; referrer no-referrer"> ...
4 years, 6 months ago (2016-06-21 17:41:33 UTC) #6
Mike West
https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2075053003/diff/20001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode521 third_party/WebKit/Source/core/loader/FrameLoader.cpp:521: ReferrerPolicy referrerPolicy = parseReferrerPolicyHeader(referrerPolicyHeader); On 2016/06/21 at 17:41:33, estark ...
4 years, 6 months ago (2016-06-22 18:57:04 UTC) #7
estark
Alrighty, I moved the new parsing logic into ExecutionContext::parseAndSetReferrerPolicy(), replacing Document::processReferrerPolicy(). This'll let me re-use ...
4 years, 6 months ago (2016-06-23 03:09:20 UTC) #8
estark
Alrighty, I moved the new parsing logic into ExecutionContext::parseAndSetReferrerPolicy(), replacing Document::processReferrerPolicy(). This'll let me re-use ...
4 years, 6 months ago (2016-06-23 03:09:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2075053003/80001
4 years, 6 months ago (2016-06-23 17:32:04 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/249233)
4 years, 6 months ago (2016-06-23 18:59:25 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2075053003/100001
4 years, 6 months ago (2016-06-23 19:06:27 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-23 20:43:51 UTC) #18
commit-bot: I haz the power
4 years, 6 months ago (2016-06-23 20:45:31 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/b89eeea12cc26b0164a89398b6c3e519b3d9fa4f
Cr-Commit-Position: refs/heads/master@{#401709}

Powered by Google App Engine
This is Rietveld 408576698