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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2763563003: [DevTools] Update SecurityDetails in Security panel if State changes (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Security.SecurityPanel = class extends UI.PanelWithSidebar { 8 Security.SecurityPanel = class extends UI.PanelWithSidebar {
9 constructor() { 9 constructor() {
10 super('security'); 10 super('security');
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 else if ( 191 else if (
192 request.mixedContentType === Protocol.Network.RequestMixedContentType.Op tionallyBlockable && 192 request.mixedContentType === Protocol.Network.RequestMixedContentType.Op tionallyBlockable &&
193 this._displayedInsecureContentStyle) 193 this._displayedInsecureContentStyle)
194 securityState = this._displayedInsecureContentStyle; 194 securityState = this._displayedInsecureContentStyle;
195 195
196 if (this._origins.has(origin)) { 196 if (this._origins.has(origin)) {
197 var originState = this._origins.get(origin); 197 var originState = this._origins.get(origin);
198 var oldSecurityState = originState.securityState; 198 var oldSecurityState = originState.securityState;
199 originState.securityState = this._securityStateMin(oldSecurityState, secur ityState); 199 originState.securityState = this._securityStateMin(oldSecurityState, secur ityState);
200 if (oldSecurityState !== originState.securityState) { 200 if (oldSecurityState !== originState.securityState) {
201 let securityDetails = /** @type {?Protocol.Network.SecurityDetails} */ ( request.securityDetails());
202 if (securityDetails)
203 originState.securityDetails = securityDetails;
201 this._sidebarTree.updateOrigin(origin, securityState); 204 this._sidebarTree.updateOrigin(origin, securityState);
202 if (originState.originView) 205 if (originState.originView)
203 originState.originView.setSecurityState(securityState); 206 originState.originView.setSecurityState(securityState);
204 } 207 }
205 } else { 208 } else {
206 // TODO(lgarron): Store a (deduplicated) list of different security detail s we have seen. https://crbug.com/503170 209 // TODO(lgarron): Store a (deduplicated) list of different security detail s we have seen. https://crbug.com/503170
207 var originState = {}; 210 var originState = {};
208 originState.securityState = securityState; 211 originState.securityState = securityState;
209 212
210 var securityDetails = request.securityDetails(); 213 var securityDetails = request.securityDetails();
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 var row = this._element.createChild('div', 'details-table-row'); 1045 var row = this._element.createChild('div', 'details-table-row');
1043 row.createChild('div').textContent = key; 1046 row.createChild('div').textContent = key;
1044 1047
1045 var valueDiv = row.createChild('div'); 1048 var valueDiv = row.createChild('div');
1046 if (typeof value === 'string') 1049 if (typeof value === 'string')
1047 valueDiv.textContent = value; 1050 valueDiv.textContent = value;
1048 else 1051 else
1049 valueDiv.appendChild(value); 1052 valueDiv.appendChild(value);
1050 } 1053 }
1051 }; 1054 };
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/security-details-updated-with-security-state-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698