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

Issue 1299493003: Attach mixed content status to resource requests when sent to devtools (Closed)

Created:
5 years, 4 months ago by estark
Modified:
5 years, 4 months ago
Reviewers:
Mike West, pfeldman
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, caseq+blink_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, kozyatinskiy+blink_chromium.org, lgarron, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sergeyv+blink_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss, yurys+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Attach mixed content status to resource requests when sent to devtools This CL computes the mixed content status (blockable, optionally blockable, or not mixed) of resource requests before they are sent to DevTools via the InspectorResourceAgent. The ResourceRequests's mixed content status gets sent to DevTools as part of the Request parameter to the requestWillBeSent event. The mixed content status will be used to display mixed resources in the Security panel. BUG=518065 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200936

Patch Set 1 #

Total comments: 4

Patch Set 2 : mkwst comments #

Total comments: 1

Patch Set 3 : isMixedContent() -> ContextTypeNotMixedContent, and rename devtools protocol enum #

Total comments: 3

Patch Set 4 : change to MixedContentChecker::contextTypeForInspector() #

Total comments: 4

Patch Set 5 : pfeldman test comments #

Patch Set 6 : add FIXME to test #

Patch Set 7 : add a comment #

Patch Set 8 : rebase #

Patch Set 9 : add contextTypeForInspector() unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -22 lines) Patch
A LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html View 1 2 3 4 5 1 chunk +70 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-expected.txt View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector-protocol/resources/active-mixed-content-iframe.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + LayoutTests/http/tests/inspector-protocol/resources/blank.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/inspector-protocol/resources/no-mixed-content-iframe.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector-protocol/resources/passive-mixed-content-iframe.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentation.idl View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorResourceAgent.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorResourceAgent.cpp View 1 2 3 4 5 6 7 4 chunks +19 lines, -1 line 0 comments Download
M Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -13 lines 0 comments Download
M Source/core/loader/MixedContentChecker.h View 1 2 3 3 chunks +13 lines, -6 lines 0 comments Download
M Source/core/loader/MixedContentChecker.cpp View 1 2 3 4 5 6 2 chunks +34 lines, -0 lines 0 comments Download
M Source/core/loader/MixedContentCheckerTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -0 lines 0 comments Download
M Source/devtools/protocol.json View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 45 (7 generated)
estark
pfeldman: could you please review the devtools changes in this CL? That would be InspectorResourceAgent.cpp ...
5 years, 4 months ago (2015-08-14 22:50:21 UTC) #2
Mike West
I agree that dropping const is the better of two evils (the other being to ...
5 years, 4 months ago (2015-08-17 15:36:45 UTC) #3
estark
https://codereview.chromium.org/1299493003/diff/1/Source/core/loader/MixedContentChecker.h File Source/core/loader/MixedContentChecker.h (right): https://codereview.chromium.org/1299493003/diff/1/Source/core/loader/MixedContentChecker.h#newcode58 Source/core/loader/MixedContentChecker.h:58: static bool shouldBlockFetch(LocalFrame*, ResourceRequest*, WebURLRequest::RequestContext, WebURLRequest::FrameType, const KURL&, ReportingStatus ...
5 years, 4 months ago (2015-08-17 17:20:12 UTC) #4
Mike West
On 2015/08/17 at 17:20:12, estark wrote: > https://codereview.chromium.org/1299493003/diff/1/Source/core/loader/MixedContentChecker.h > File Source/core/loader/MixedContentChecker.h (right): > > https://codereview.chromium.org/1299493003/diff/1/Source/core/loader/MixedContentChecker.h#newcode58 ...
5 years, 4 months ago (2015-08-17 17:32:27 UTC) #5
estark
Thanks, Mike. Changed isMixedContent() to ContextTypeNotMixedContent, and changed the language in the devtools protocol enum. ...
5 years, 4 months ago (2015-08-17 17:55:35 UTC) #6
Mike West
LGTM. Land it once Pavel is happy. :)
5 years, 4 months ago (2015-08-17 19:43:42 UTC) #7
pfeldman
https://codereview.chromium.org/1299493003/diff/40001/Source/core/inspector/InspectorResourceAgent.cpp File Source/core/inspector/InspectorResourceAgent.cpp (right): https://codereview.chromium.org/1299493003/diff/40001/Source/core/inspector/InspectorResourceAgent.cpp#newcode207 Source/core/inspector/InspectorResourceAgent.cpp:207: TypeBuilder::Network::Request::MixedContentType::Enum getMixedContentType(const ResourceRequest& request) no get prefixes in Blink ...
5 years, 4 months ago (2015-08-17 20:32:52 UTC) #8
estark
https://codereview.chromium.org/1299493003/diff/40001/Source/core/loader/MixedContentChecker.cpp File Source/core/loader/MixedContentChecker.cpp (right): https://codereview.chromium.org/1299493003/diff/40001/Source/core/loader/MixedContentChecker.cpp#newcode301 Source/core/loader/MixedContentChecker.cpp:301: request->setContextType(ResourceRequest::ContextTypeNotMixedContent); On 2015/08/17 20:32:52, pfeldman wrote: > Sorry for ...
5 years, 4 months ago (2015-08-17 20:36:22 UTC) #9
pfeldman
> Mike preferred setting it here on the request. If we return an enum, it ...
5 years, 4 months ago (2015-08-17 21:17:48 UTC) #10
pfeldman
Also, why would canRequest behavior change? Could you point to exactly what information you need ...
5 years, 4 months ago (2015-08-17 21:21:03 UTC) #11
estark
On 2015/08/17 21:21:03, pfeldman wrote: > Also, why would canRequest behavior change? Could you point ...
5 years, 4 months ago (2015-08-17 21:32:51 UTC) #12
Mike West
On 2015/08/17 at 21:32:51, estark wrote: > On 2015/08/17 21:21:03, pfeldman wrote: > > Also, ...
5 years, 4 months ago (2015-08-17 21:36:50 UTC) #13
pfeldman
> If Pavel has strong feelings about it, I'm happy to make you do a ...
5 years, 4 months ago (2015-08-17 21:55:37 UTC) #14
estark
On 2015/08/17 21:55:37, pfeldman wrote: > > If Pavel has strong feelings about it, I'm ...
5 years, 4 months ago (2015-08-17 21:58:08 UTC) #15
pfeldman
Can we add something as simple as say: MixedContentChecker::contextTypeFromContextForInspector(frame, request, requestContext) { LocalFrame* mixedFrame = ...
5 years, 4 months ago (2015-08-17 22:17:35 UTC) #16
estark
On 2015/08/17 22:17:35, pfeldman wrote: > Can we add something as simple as say: > ...
5 years, 4 months ago (2015-08-17 22:20:36 UTC) #17
pfeldman
It should. Annotate frame of willSendRequest as [Keep] in InspectorInstrumentation.idl and add it as a ...
5 years, 4 months ago (2015-08-17 22:25:17 UTC) #18
estark
On 2015/08/17 22:25:17, pfeldman wrote: > It should. Annotate frame of willSendRequest as [Keep] in ...
5 years, 4 months ago (2015-08-17 22:31:17 UTC) #19
pfeldman
> We can duplicate that in InspectorResourceAgent, but to me it feels a little > ...
5 years, 4 months ago (2015-08-17 22:59:25 UTC) #20
estark
On 2015/08/17 22:59:25, pfeldman wrote: > > We can duplicate that in InspectorResourceAgent, but to ...
5 years, 4 months ago (2015-08-17 23:04:15 UTC) #21
pfeldman
> I just mean that in general, to me, returning an enum seems much less ...
5 years, 4 months ago (2015-08-17 23:07:04 UTC) #22
estark
On 2015/08/17 23:07:04, pfeldman wrote: > > I just mean that in general, to me, ...
5 years, 4 months ago (2015-08-18 00:02:11 UTC) #24
estark
friendly ping
5 years, 4 months ago (2015-08-19 15:32:00 UTC) #25
pfeldman
The code looks good, the test could be improved though. https://codereview.chromium.org/1299493003/diff/80001/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html File LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html (right): https://codereview.chromium.org/1299493003/diff/80001/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html#newcode53 ...
5 years, 4 months ago (2015-08-19 17:10:19 UTC) #26
estark
https://codereview.chromium.org/1299493003/diff/80001/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html File LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html (right): https://codereview.chromium.org/1299493003/diff/80001/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html#newcode53 LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html:53: if (req.url.indexOf("check-mixed-content-status") === -1) On 2015/08/19 17:10:19, pfeldman wrote: ...
5 years, 4 months ago (2015-08-19 19:07:04 UTC) #27
pfeldman
Ok, we can follow up on the test when you are on site, mind adding ...
5 years, 4 months ago (2015-08-19 19:09:35 UTC) #28
pfeldman
lgtm
5 years, 4 months ago (2015-08-19 19:09:41 UTC) #29
estark
On 2015/08/19 19:09:35, pfeldman wrote: > Ok, we can follow up on the test when ...
5 years, 4 months ago (2015-08-19 20:13:29 UTC) #30
Mike West
On 2015/08/19 at 20:13:29, estark wrote: > On 2015/08/19 19:09:35, pfeldman wrote: > > Ok, ...
5 years, 4 months ago (2015-08-19 22:55:55 UTC) #31
Mike West
On 2015/08/19 at 22:55:55, Mike West (traveling) wrote: > On 2015/08/19 at 20:13:29, estark wrote: ...
5 years, 4 months ago (2015-08-19 22:59:17 UTC) #32
estark
Discussed with Mike in person to clear up the confusion, and added a MixedContentChecker::contextTypeForInspector() unit ...
5 years, 4 months ago (2015-08-20 05:05:23 UTC) #33
pfeldman
devtools still lgtm, deferring the test review to Mike.
5 years, 4 months ago (2015-08-20 18:30:59 UTC) #34
Mike West
LGTM, thanks!
5 years, 4 months ago (2015-08-20 20:07:45 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1299493003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1299493003/180001
5 years, 4 months ago (2015-08-20 20:12:29 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1299493003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1299493003/180001
5 years, 4 months ago (2015-08-20 20:31:34 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/101384)
5 years, 4 months ago (2015-08-20 21:20:47 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1299493003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1299493003/180001
5 years, 4 months ago (2015-08-20 21:31:46 UTC) #44
commit-bot: I haz the power
5 years, 4 months ago (2015-08-20 22:43:27 UTC) #45
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200936

Powered by Google App Engine
This is Rietveld 408576698