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

Issue 1163963002: Implement SecurityHandler to send the lock icon status to DevTools. (Closed)

Created:
5 years, 6 months ago by lgarron
Modified:
5 years, 6 months ago
Reviewers:
pfeldman, estark
CC:
chromium-reviews, darin-cc_chromium.org, devtools-reviews_chromium.org, jam, yurys
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement SecurityHandler to send the lock icon status to DevTools. BUG=445359, 484401 Committed: https://crrev.com/109a12898b9a46a620b67cde853e5ef431fa2799 Cr-Commit-Position: refs/heads/master@{#334223}

Patch Set 1 #

Total comments: 23

Patch Set 2 : Make SecurityHandler a WebContentsObserver itself and rebase onto stub CL. #

Total comments: 8

Patch Set 3 : Style fixes. #

Total comments: 3

Patch Set 4 : Add #include that was removed from stub CL. #

Patch Set 5 : Restore stub as the diff base. #

Patch Set 6 : Change destructor to override. #

Total comments: 5

Patch Set 7 : Fix method order, include, and NOTREACHED(). #

Patch Set 8 : Add web_contents.h to security_handler.cc for WebContents::FromRenderFrameHost(). #

Total comments: 10

Patch Set 9 : Address Pavel's comments. #

Total comments: 2

Patch Set 10 : Only attach SecurityHandler to top-level frames. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -6 lines) Patch
M content/browser/devtools/protocol/security_handler.h View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -4 lines 0 comments Download
M content/browser/devtools/protocol/security_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +52 lines, -2 lines 0 comments Download
M content/browser/devtools/render_frame_devtools_agent_host.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/devtools/render_frame_devtools_agent_host.cc View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (9 generated)
estark
I'm still thinking about how to test this one. Any ideas? Left a few style ...
5 years, 6 months ago (2015-06-04 01:09:15 UTC) #2
pfeldman
Mostly nits with one important comment that would make you implement it all a bit ...
5 years, 6 months ago (2015-06-04 09:28:35 UTC) #4
estark
https://codereview.chromium.org/1163963002/diff/1/content/browser/devtools/render_frame_devtools_agent_host.h File content/browser/devtools/render_frame_devtools_agent_host.h (right): https://codereview.chromium.org/1163963002/diff/1/content/browser/devtools/render_frame_devtools_agent_host.h#newcode103 content/browser/devtools/render_frame_devtools_agent_host.h:103: void SecurityStyleChanged(content::SecurityStyle security_style) override; On 2015/06/04 09:28:35, pfeldman wrote: ...
5 years, 6 months ago (2015-06-04 14:35:27 UTC) #5
pfeldman
That's almost what I was suggesting. But you want to register WCO in the security ...
5 years, 6 months ago (2015-06-04 15:40:37 UTC) #6
estark
On 2015/06/04 15:40:37, pfeldman wrote: > That's almost what I was suggesting. But you want ...
5 years, 6 months ago (2015-06-04 15:52:23 UTC) #7
pfeldman
> Is that correct? Exactly! // At some point, handlers will be added externally and ...
5 years, 6 months ago (2015-06-04 16:03:33 UTC) #8
estark
On 2015/06/04 16:03:33, pfeldman wrote: > > Is that correct? > > Exactly! > > ...
5 years, 6 months ago (2015-06-04 16:05:08 UTC) #9
estark
https://codereview.chromium.org/1163963002/diff/1/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/1/content/browser/devtools/protocol/security_handler.cc#newcode32 content/browser/devtools/protocol/security_handler.cc:32: client_->SecurityStateChanged( Ah, just realized this won't build without the ...
5 years, 6 months ago (2015-06-05 00:59:10 UTC) #10
lgarron
I agree with pretty much everything so far. I've fixed the nits locally; I'm working ...
5 years, 6 months ago (2015-06-05 01:29:18 UTC) #11
lgarron
I've uploaded a new patch with the suggested change. However, there is a problem: the ...
5 years, 6 months ago (2015-06-06 00:57:41 UTC) #12
estark
On 2015/06/06 00:57:41, lgarron wrote: > I've uploaded a new patch with the suggested change. ...
5 years, 6 months ago (2015-06-06 02:35:27 UTC) #13
estark
https://codereview.chromium.org/1163963002/diff/20001/chrome/browser/ssl/connection_security_helper.h File chrome/browser/ssl/connection_security_helper.h (right): https://codereview.chromium.org/1163963002/diff/20001/chrome/browser/ssl/connection_security_helper.h#newcode64 chrome/browser/ssl/connection_security_helper.h:64: static content::SecurityStyle GetSecurityStyleForWebContents( Is this diff supposed to be ...
5 years, 6 months ago (2015-06-06 02:38:36 UTC) #14
estark
Ok, I just played around with this a little bit to try to see what's ...
5 years, 6 months ago (2015-06-06 06:33:26 UTC) #15
pfeldman
Correct, that is the only way until the repos merge: 1) stub handlers 2) protocol.json ...
5 years, 6 months ago (2015-06-06 06:49:12 UTC) #16
lgarron
5 years, 6 months ago (2015-06-08 22:30:03 UTC) #17
lgarron
On 2015/06/08 at 22:30:03, lgarron wrote: > See the latest patch. Corresponding to Pavel's numbering, ...
5 years, 6 months ago (2015-06-09 00:59:57 UTC) #19
estark
https://codereview.chromium.org/1163963002/diff/40001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/40001/content/browser/devtools/protocol/security_handler.cc#newcode9 content/browser/devtools/protocol/security_handler.cc:9: #include "base/logging.h" not needed https://codereview.chromium.org/1163963002/diff/40001/content/browser/devtools/protocol/security_handler.cc#newcode58 content/browser/devtools/protocol/security_handler.cc:58: // TODO: Replace ...
5 years, 6 months ago (2015-06-09 05:18:55 UTC) #20
lgarron
https://codereview.chromium.org/1163963002/diff/40001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/40001/content/browser/devtools/protocol/security_handler.cc#newcode9 content/browser/devtools/protocol/security_handler.cc:9: #include "base/logging.h" On 2015/06/09 at 05:18:54, estark wrote: > ...
5 years, 6 months ago (2015-06-09 18:16:57 UTC) #22
lgarron
https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.cc#newcode60 content/browser/devtools/protocol/security_handler.cc:60: return "unknown"; estark@: Since this value can theoretically be ...
5 years, 6 months ago (2015-06-09 18:33:56 UTC) #23
pfeldman
https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.h File content/browser/devtools/protocol/security_handler.h (right): https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.h#newcode18 content/browser/devtools/protocol/security_handler.h:18: class SecurityHandler : private WebContentsObserver { Please rebaseline it ...
5 years, 6 months ago (2015-06-09 18:36:44 UTC) #24
lgarron
https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.h File content/browser/devtools/protocol/security_handler.h (right): https://codereview.chromium.org/1163963002/diff/80001/content/browser/devtools/protocol/security_handler.h#newcode18 content/browser/devtools/protocol/security_handler.h:18: class SecurityHandler : private WebContentsObserver { On 2015/06/09 at ...
5 years, 6 months ago (2015-06-09 18:54:45 UTC) #25
pfeldman
> The latest patch is already rebased onto the #include > "content/public/common/security_style.h" change. Anything else? ...
5 years, 6 months ago (2015-06-09 19:05:19 UTC) #26
lgarron
On 2015/06/09 at 19:05:19, pfeldman wrote: > > The latest patch is already rebased onto ...
5 years, 6 months ago (2015-06-09 19:11:13 UTC) #27
lgarron
Rebased. Also used kSecurityStateUnknown based on the latest protocol.json patch (https://codereview.chromium.org/1167693010).
5 years, 6 months ago (2015-06-09 20:32:04 UTC) #28
estark
https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc#newcode25 content/browser/devtools/protocol/security_handler.cc:25: void SecurityHandler::SetRenderFrameHost(RenderFrameHost* host) { swap these two definitions (SetRFH ...
5 years, 6 months ago (2015-06-09 21:51:45 UTC) #30
estark
On 2015/06/09 21:51:45, estark wrote: > https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc > File content/browser/devtools/protocol/security_handler.cc (right): > > https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc#newcode25 > ...
5 years, 6 months ago (2015-06-09 21:52:16 UTC) #31
lgarron
On 2015/06/09 at 21:52:16, estark wrote: > On 2015/06/09 21:51:45, estark wrote: > > https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc ...
5 years, 6 months ago (2015-06-09 22:00:31 UTC) #32
lgarron
https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/140001/content/browser/devtools/protocol/security_handler.cc#newcode25 content/browser/devtools/protocol/security_handler.cc:25: void SecurityHandler::SetRenderFrameHost(RenderFrameHost* host) { On 2015/06/09 at 21:51:45, estark ...
5 years, 6 months ago (2015-06-09 22:12:10 UTC) #34
lgarron
pfeldman@: Ping. I don't think there are any more expected changes from me here.
5 years, 6 months ago (2015-06-10 22:47:41 UTC) #36
pfeldman
https://codereview.chromium.org/1163963002/diff/200001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/200001/content/browser/devtools/protocol/security_handler.cc#newcode17 content/browser/devtools/protocol/security_handler.cc:17: SecurityHandler::SecurityHandler() : enabled_(false), host_(nullptr) { http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Constructor_Initializer_Lists https://codereview.chromium.org/1163963002/diff/200001/content/browser/devtools/protocol/security_handler.cc#newcode34 content/browser/devtools/protocol/security_handler.cc:34: if ...
5 years, 6 months ago (2015-06-11 06:45:50 UTC) #37
lgarron
https://codereview.chromium.org/1163963002/diff/200001/content/browser/devtools/protocol/security_handler.cc File content/browser/devtools/protocol/security_handler.cc (right): https://codereview.chromium.org/1163963002/diff/200001/content/browser/devtools/protocol/security_handler.cc#newcode17 content/browser/devtools/protocol/security_handler.cc:17: SecurityHandler::SecurityHandler() : enabled_(false), host_(nullptr) { On 2015/06/11 at 06:45:50, ...
5 years, 6 months ago (2015-06-11 22:00:53 UTC) #38
pfeldman
lgtm % comment https://codereview.chromium.org/1163963002/diff/240001/content/browser/devtools/render_frame_devtools_agent_host.cc File content/browser/devtools/render_frame_devtools_agent_host.cc (right): https://codereview.chromium.org/1163963002/diff/240001/content/browser/devtools/render_frame_devtools_agent_host.cc#newcode299 content/browser/devtools/render_frame_devtools_agent_host.cc:299: security_handler_(new devtools::security::SecurityHandler()), Initialize it on line ...
5 years, 6 months ago (2015-06-12 17:46:03 UTC) #39
lgarron
https://codereview.chromium.org/1163963002/diff/240001/content/browser/devtools/render_frame_devtools_agent_host.cc File content/browser/devtools/render_frame_devtools_agent_host.cc (right): https://codereview.chromium.org/1163963002/diff/240001/content/browser/devtools/render_frame_devtools_agent_host.cc#newcode299 content/browser/devtools/render_frame_devtools_agent_host.cc:299: security_handler_(new devtools::security::SecurityHandler()), On 2015/06/12 at 17:46:02, pfeldman wrote: > ...
5 years, 6 months ago (2015-06-12 18:38:11 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963002/260001
5 years, 6 months ago (2015-06-12 18:39:44 UTC) #43
commit-bot: I haz the power
Committed patchset #10 (id:260001)
5 years, 6 months ago (2015-06-12 19:49:39 UTC) #44
commit-bot: I haz the power
5 years, 6 months ago (2015-06-12 19:50:31 UTC) #45
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/109a12898b9a46a620b67cde853e5ef431fa2799
Cr-Commit-Position: refs/heads/master@{#334223}

Powered by Google App Engine
This is Rietveld 408576698