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

Side by Side Diff: Source/devtools/front_end/sdk/NetworkManager.js

Issue 1323273002: Ignore blank origins in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move to the model level. Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 this._dispatchResponseReceivedSecurityDetails(requestId, response); 356 this._dispatchResponseReceivedSecurityDetails(requestId, response);
357 }, 357 },
358 358
359 /** 359 /**
360 * @param {!NetworkAgent.RequestId} requestId 360 * @param {!NetworkAgent.RequestId} requestId
361 * @param {!NetworkAgent.Response} response 361 * @param {!NetworkAgent.Response} response
362 */ 362 */
363 _dispatchResponseReceivedSecurityDetails: function(requestId, response) 363 _dispatchResponseReceivedSecurityDetails: function(requestId, response)
364 { 364 {
365 var origin = WebInspector.ParsedURL.splitURLIntoPathComponents(response. url)[0];
dgozman 2015/09/03 21:01:16 Side note: do you need to include port here? If so
366 if (!origin) {
367 // We don't handle resources like data: URIs. Most of them don't aff ect the lock icon.
368 return;
369 }
370
365 var eventData = {}; 371 var eventData = {};
366 eventData.requestId = requestId; 372 eventData.requestId = requestId;
367 eventData.origin = WebInspector.ParsedURL.splitURLIntoPathComponents(res ponse.url)[0]; 373 eventData.origin = origin;
368 eventData.securityState = response.securityState; 374 eventData.securityState = response.securityState;
369 if (response.securityDetails) { 375 if (response.securityDetails) {
370 /** 376 /**
371 * @this {WebInspector.NetworkDispatcher} 377 * @this {WebInspector.NetworkDispatcher}
372 * @param {?Protocol.Error} error 378 * @param {?Protocol.Error} error
373 * @param {!NetworkAgent.CertificateDetails} certificateDetails 379 * @param {!NetworkAgent.CertificateDetails} certificateDetails
374 */ 380 */
375 function callback(error, certificateDetails) 381 function callback(error, certificateDetails)
376 { 382 {
377 if (error) 383 if (error)
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 target.networkAgent().removeBlockedURL(url); 769 target.networkAgent().removeBlockedURL(url);
764 }, 770 },
765 771
766 __proto__: WebInspector.Object.prototype 772 __proto__: WebInspector.Object.prototype
767 } 773 }
768 774
769 /** 775 /**
770 * @type {!WebInspector.MultitargetNetworkManager} 776 * @type {!WebInspector.MultitargetNetworkManager}
771 */ 777 */
772 WebInspector.multitargetNetworkManager; 778 WebInspector.multitargetNetworkManager;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698