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

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

Issue 2756983002: [DevTools] Fallback to MainFrameNavigated event url in Security panel (Closed)
Patch Set: Rebase, change const to let 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 this.selectAndSwitchToMainView(); 344 this.selectAndSwitchToMainView();
345 this._sidebarTree.clearOrigins(); 345 this._sidebarTree.clearOrigins();
346 this._origins.clear(); 346 this._origins.clear();
347 this._lastResponseReceivedForLoaderId.clear(); 347 this._lastResponseReceivedForLoaderId.clear();
348 this._filterRequestCounts.clear(); 348 this._filterRequestCounts.clear();
349 // After clearing the filtered request counts, refresh the 349 // After clearing the filtered request counts, refresh the
350 // explanations to reflect the new counts. 350 // explanations to reflect the new counts.
351 this._mainView.refreshExplanations(); 351 this._mainView.refreshExplanations();
352 352
353 if (request) { 353 // If we could not find a matching request (as in the case of clicking
354 var origin = Common.ParsedURL.extractOrigin(request.url()); 354 // through an interstitial, see crbug.com/669309), set the origin based upon
355 this._sidebarTree.setMainOrigin(origin); 355 // the url data from the MainFrameNavigated event itself.
356 let origin = Common.ParsedURL.extractOrigin(request ? request.url() : frame. url);
357 this._sidebarTree.setMainOrigin(origin);
358
359 if (request)
356 this._processRequest(request); 360 this._processRequest(request);
357 }
358 } 361 }
359 362
360 _onInterstitialShown() { 363 _onInterstitialShown() {
361 // The panel might have been displaying the origin view on the 364 // The panel might have been displaying the origin view on the
362 // previously loaded page. When showing an interstitial, switch 365 // previously loaded page. When showing an interstitial, switch
363 // back to the Overview view. 366 // back to the Overview view.
364 this.selectAndSwitchToMainView(); 367 this.selectAndSwitchToMainView();
365 this._sidebarTree.toggleOriginsList(true /* hidden */); 368 this._sidebarTree.toggleOriginsList(true /* hidden */);
366 } 369 }
367 370
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 var row = this._element.createChild('div', 'details-table-row'); 1048 var row = this._element.createChild('div', 'details-table-row');
1046 row.createChild('div').textContent = key; 1049 row.createChild('div').textContent = key;
1047 1050
1048 var valueDiv = row.createChild('div'); 1051 var valueDiv = row.createChild('div');
1049 if (typeof value === 'string') 1052 if (typeof value === 'string')
1050 valueDiv.textContent = value; 1053 valueDiv.textContent = value;
1051 else 1054 else
1052 valueDiv.appendChild(value); 1055 valueDiv.appendChild(value);
1053 } 1056 }
1054 }; 1057 };
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/main-origin-assigned-despite-request-missing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698