Skip to content

Commit

Permalink
[DevTools] Update SecurityDetails in Security panel if State changes
Browse files Browse the repository at this point in the history
When the SecurityState for an origin changes, update the Security
Details for that origin as well. This mitigates scenarios where the
Details may not have been available initially (e.g. an image pulled
from the MemoryCache without the Developer Tools loaded will not have
any SecurityDetails recorded.

BUG=702001
TEST=blink_layouttests security-details-updated-with-security-state

Review-Url: https://codereview.chromium.org/2763563003
Cr-Commit-Position: refs/heads/master@{#458562}
  • Loading branch information
ericlaw1979 authored and Commit bot committed Mar 21, 2017
1 parent 6628483 commit fdd03a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions front_end/security/SecurityPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ Security.SecurityPanel = class extends UI.PanelWithSidebar {
var oldSecurityState = originState.securityState;
originState.securityState = this._securityStateMin(oldSecurityState, securityState);
if (oldSecurityState !== originState.securityState) {
let securityDetails = /** @type {?Protocol.Network.SecurityDetails} */ (request.securityDetails());
if (securityDetails)
originState.securityDetails = securityDetails;
this._sidebarTree.updateOrigin(origin, securityState);
if (originState.originView)
originState.originView.setSecurityState(securityState);
Expand Down

0 comments on commit fdd03a0

Please sign in to comment.