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

Issue 2025633002: Move 'ContentSecurityPolicy::RedirectStatus' into 'ResourceRequest' (Closed)

Created:
4 years, 6 months ago by Mike West
Modified:
4 years, 6 months ago
Reviewers:
foolip
CC:
blink-reviews, chromium-reviews, falken, gavinp+loader_chromium.org, haraken, horo+watch_chromium.org, Nate Chapin, jsbell+serviceworker_chromium.org, kinuko+serviceworker, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, michaeln, mkwst+watchlist-csp_chromium.org, nhiroki, serviceworker-reviews, tyoshino+watch_chromium.org, tzik, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move 'ContentSecurityPolicy::RedirectStatus' into 'ResourceRequest' For patches like https://codereview.chromium.org/2002943002, we actually need to start passing the redirect status around through bits and pieces of the system outside of 'ContentSecurityPolicy'. Since we originally grab the status from 'ResourceRequest', it makes sense to centralize the enum there as well. This patch should have no web-visible effect; it's just internal refactoring to make the next patch simpler. R=foolip@chromium.org Committed: https://crrev.com/8cc4f6cb03fb736271e6c27385b7534087591947 Cr-Commit-Position: refs/heads/master@{#396717}

Patch Set 1 #

Total comments: 6

Patch Set 2 : foolip@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -117 lines) Patch
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h View 4 chunks +15 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp View 5 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSource.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSource.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSourceList.h View 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSourceList.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSourceListTest.cpp View 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp View 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h View 5 chunks +15 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 5 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp View 3 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/SourceListDirective.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 4 chunks +4 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.h View 4 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.cpp View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Mike West
Would you mind taking a look at this? It's a fairly mechanical refactoring of `ContentSecurityPolicy::RedirectStatus::{DidRedirect,DidNotRedirect}` ...
4 years, 6 months ago (2016-05-30 09:14:23 UTC) #1
foolip
Nice cleanup, lgtm % nits! https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp File third_party/WebKit/Source/core/frame/csp/CSPSource.cpp (right): https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp#newcode9 third_party/WebKit/Source/core/frame/csp/CSPSource.cpp:9: Intentional? https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/core/frame/csp/CSPSource.h File third_party/WebKit/Source/core/frame/csp/CSPSource.h ...
4 years, 6 months ago (2016-05-30 10:10:23 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2025633002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2025633002/20001
4 years, 6 months ago (2016-05-30 10:58:46 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-05-30 12:52:26 UTC) #6
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/8cc4f6cb03fb736271e6c27385b7534087591947 Cr-Commit-Position: refs/heads/master@{#396717}
4 years, 6 months ago (2016-05-30 12:53:43 UTC) #8
Mike West
4 years, 6 months ago (2016-05-30 14:59:31 UTC) #9
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/frame/csp/CSPSource.cpp (right):

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/frame/csp/CSPSource.cpp:9: 
On 2016/05/30 at 10:10:23, Philip Jägenstedt wrote:
> Intentional?

Not at all! Thanks. :)

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/frame/csp/CSPSource.h (right):

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/frame/csp/CSPSource.h:28: bool matches(const
KURL&, RedirectStatus = ResourceRequest::RedirectStatus::NoRedirect) const;
On 2016/05/30 at 10:10:23, Philip Jägenstedt wrote:
> I suppose the alias in ContentSecurityPolicy.h is why this works, but using
the same form twice here would leave no room for confusion. (Is there more than
one type, I asked myself.)

Yeah, this was a typo; I moved the enum from outside `ResourceRequest` into
`ResourceRequest` at some point while writing this and apparently did a bad job
updating the usage. :/

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/frame/csp/SourceListDirective.h (right):

https://codereview.chromium.org/2025633002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/frame/csp/SourceListDirective.h:10: #include
"core/frame/csp/ContentSecurityPolicy.h"
On 2016/05/30 at 10:10:23, Philip Jägenstedt wrote:
> Is this include still needed? ContentSecurityPolicy is forward declared.

You're right. Weird. Dropped.

Powered by Google App Engine
This is Rietveld 408576698