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

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

Issue 2626553002: [Devtools][Code health] Changed NetworkRequest.url to proper getter/setter (Closed)
Patch Set: changes Created 3 years, 11 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 _onResponseReceived(event) { 169 _onResponseReceived(event) {
170 var request = /** @type {!SDK.NetworkRequest} */ (event.data); 170 var request = /** @type {!SDK.NetworkRequest} */ (event.data);
171 if (request.resourceType() === Common.resourceTypes.Document) 171 if (request.resourceType() === Common.resourceTypes.Document)
172 this._lastResponseReceivedForLoaderId.set(request.loaderId, request); 172 this._lastResponseReceivedForLoaderId.set(request.loaderId, request);
173 } 173 }
174 174
175 /** 175 /**
176 * @param {!SDK.NetworkRequest} request 176 * @param {!SDK.NetworkRequest} request
177 */ 177 */
178 _processRequest(request) { 178 _processRequest(request) {
179 var origin = Common.ParsedURL.extractOrigin(request.url); 179 var origin = Common.ParsedURL.extractOrigin(request.url());
180 180
181 if (!origin) { 181 if (!origin) {
182 // We don't handle resources like data: URIs. Most of them don't affect th e lock icon. 182 // We don't handle resources like data: URIs. Most of them don't affect th e lock icon.
183 return; 183 return;
184 } 184 }
185 185
186 var securityState = /** @type {!Protocol.Security.SecurityState} */ (request .securityState()); 186 var securityState = /** @type {!Protocol.Security.SecurityState} */ (request .securityState());
187 187
188 if (request.mixedContentType === Protocol.Network.RequestMixedContentType.Bl ockable && 188 if (request.mixedContentType === Protocol.Network.RequestMixedContentType.Bl ockable &&
189 this._ranInsecureContentStyle) 189 this._ranInsecureContentStyle)
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 this.selectAndSwitchToMainView(); 341 this.selectAndSwitchToMainView();
342 this._sidebarTree.clearOrigins(); 342 this._sidebarTree.clearOrigins();
343 this._origins.clear(); 343 this._origins.clear();
344 this._lastResponseReceivedForLoaderId.clear(); 344 this._lastResponseReceivedForLoaderId.clear();
345 this._filterRequestCounts.clear(); 345 this._filterRequestCounts.clear();
346 // After clearing the filtered request counts, refresh the 346 // After clearing the filtered request counts, refresh the
347 // explanations to reflect the new counts. 347 // explanations to reflect the new counts.
348 this._mainView.refreshExplanations(); 348 this._mainView.refreshExplanations();
349 349
350 if (request) { 350 if (request) {
351 var origin = Common.ParsedURL.extractOrigin(request.url); 351 var origin = Common.ParsedURL.extractOrigin(request.url());
352 this._sidebarTree.setMainOrigin(origin); 352 this._sidebarTree.setMainOrigin(origin);
353 this._processRequest(request); 353 this._processRequest(request);
354 } 354 }
355 } 355 }
356 356
357 _onInterstitialShown() { 357 _onInterstitialShown() {
358 // The panel might have been displaying the origin view on the 358 // The panel might have been displaying the origin view on the
359 // previously loaded page. When showing an interstitial, switch 359 // previously loaded page. When showing an interstitial, switch
360 // back to the Overview view. 360 // back to the Overview view.
361 this.selectAndSwitchToMainView(); 361 this.selectAndSwitchToMainView();
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 var row = this._element.createChild('div', 'details-table-row'); 1042 var row = this._element.createChild('div', 'details-table-row');
1043 row.createChild('div').textContent = key; 1043 row.createChild('div').textContent = key;
1044 1044
1045 var valueDiv = row.createChild('div'); 1045 var valueDiv = row.createChild('div');
1046 if (typeof value === 'string') 1046 if (typeof value === 'string')
1047 valueDiv.textContent = value; 1047 valueDiv.textContent = value;
1048 else 1048 else
1049 valueDiv.appendChild(value); 1049 valueDiv.appendChild(value);
1050 } 1050 }
1051 }; 1051 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698