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

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

Issue 302093003: Show the correct resource type when XHR fails in the inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 { 334 {
335 var networkRequest = this._inflightRequestsById[requestId]; 335 var networkRequest = this._inflightRequestsById[requestId];
336 if (!networkRequest) 336 if (!networkRequest)
337 return; 337 return;
338 this._finishNetworkRequest(networkRequest, finishTime, encodedDataLength ); 338 this._finishNetworkRequest(networkRequest, finishTime, encodedDataLength );
339 }, 339 },
340 340
341 /** 341 /**
342 * @param {!NetworkAgent.RequestId} requestId 342 * @param {!NetworkAgent.RequestId} requestId
343 * @param {!NetworkAgent.Timestamp} time 343 * @param {!NetworkAgent.Timestamp} time
344 * @param {!PageAgent.ResourceType} resourceType
344 * @param {string} localizedDescription 345 * @param {string} localizedDescription
345 * @param {boolean=} canceled 346 * @param {boolean=} canceled
346 */ 347 */
347 loadingFailed: function(requestId, time, localizedDescription, canceled) 348 loadingFailed: function(requestId, time, resourceType, localizedDescription, canceled)
348 { 349 {
349 var networkRequest = this._inflightRequestsById[requestId]; 350 var networkRequest = this._inflightRequestsById[requestId];
350 if (!networkRequest) 351 if (!networkRequest)
351 return; 352 return;
352 353
353 networkRequest.failed = true; 354 networkRequest.failed = true;
355 networkRequest.type = WebInspector.resourceTypes[resourceType];
354 networkRequest.canceled = canceled; 356 networkRequest.canceled = canceled;
355 networkRequest.localizedFailDescription = localizedDescription; 357 networkRequest.localizedFailDescription = localizedDescription;
356 this._finishNetworkRequest(networkRequest, time, -1); 358 this._finishNetworkRequest(networkRequest, time, -1);
357 }, 359 },
358 360
359 /** 361 /**
360 * @param {!NetworkAgent.RequestId} requestId 362 * @param {!NetworkAgent.RequestId} requestId
361 * @param {string} requestURL 363 * @param {string} requestURL
362 */ 364 */
363 webSocketCreated: function(requestId, requestURL) 365 webSocketCreated: function(requestId, requestURL)
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ et, requestId, url, documentURL, frameId, loaderId); 551 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ et, requestId, url, documentURL, frameId, loaderId);
550 networkRequest.initiator = initiator; 552 networkRequest.initiator = initiator;
551 return networkRequest; 553 return networkRequest;
552 } 554 }
553 } 555 }
554 556
555 /** 557 /**
556 * @type {!WebInspector.NetworkManager} 558 * @type {!WebInspector.NetworkManager}
557 */ 559 */
558 WebInspector.networkManager; 560 WebInspector.networkManager;
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698