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

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

Issue 1315043008: [DevTools] Show blocked requests in Network panel. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: hidden 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 | Annotate | Revision Log
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 this._finishNetworkRequest(networkRequest, finishTime, encodedDataLength ); 422 this._finishNetworkRequest(networkRequest, finishTime, encodedDataLength );
423 }, 423 },
424 424
425 /** 425 /**
426 * @override 426 * @override
427 * @param {!NetworkAgent.RequestId} requestId 427 * @param {!NetworkAgent.RequestId} requestId
428 * @param {!NetworkAgent.Timestamp} time 428 * @param {!NetworkAgent.Timestamp} time
429 * @param {!PageAgent.ResourceType} resourceType 429 * @param {!PageAgent.ResourceType} resourceType
430 * @param {string} localizedDescription 430 * @param {string} localizedDescription
431 * @param {boolean=} canceled 431 * @param {boolean=} canceled
432 * @param {boolean=} blocked 432 * @param {!NetworkAgent.BlockedReason=} blockedReason
433 */ 433 */
434 loadingFailed: function(requestId, time, resourceType, localizedDescription, canceled, blocked) 434 loadingFailed: function(requestId, time, resourceType, localizedDescription, canceled, blockedReason)
435 { 435 {
436 var networkRequest = this._inflightRequestsById[requestId]; 436 var networkRequest = this._inflightRequestsById[requestId];
437 if (!networkRequest) 437 if (!networkRequest)
438 return; 438 return;
439 439
440 networkRequest.failed = true; 440 networkRequest.failed = true;
441 networkRequest.setResourceType(WebInspector.resourceTypes[resourceType]) ; 441 networkRequest.setResourceType(WebInspector.resourceTypes[resourceType]) ;
442 networkRequest.canceled = canceled; 442 networkRequest.canceled = canceled;
443 networkRequest.blocked = blocked; 443 if (blockedReason)
444 networkRequest.setBlockedReason(blockedReason);
444 networkRequest.localizedFailDescription = localizedDescription; 445 networkRequest.localizedFailDescription = localizedDescription;
445 this._finishNetworkRequest(networkRequest, time, -1); 446 this._finishNetworkRequest(networkRequest, time, -1);
446 }, 447 },
447 448
448 /** 449 /**
449 * @override 450 * @override
450 * @param {!NetworkAgent.RequestId} requestId 451 * @param {!NetworkAgent.RequestId} requestId
451 * @param {string} requestURL 452 * @param {string} requestURL
452 */ 453 */
453 webSocketCreated: function(requestId, requestURL) 454 webSocketCreated: function(requestId, requestURL)
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 target.networkAgent().removeBlockedURL(url); 762 target.networkAgent().removeBlockedURL(url);
762 }, 763 },
763 764
764 __proto__: WebInspector.Object.prototype 765 __proto__: WebInspector.Object.prototype
765 } 766 }
766 767
767 /** 768 /**
768 * @type {!WebInspector.MultitargetNetworkManager} 769 * @type {!WebInspector.MultitargetNetworkManager}
769 */ 770 */
770 WebInspector.multitargetNetworkManager; 771 WebInspector.multitargetNetworkManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698