OLD | NEW |
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 Loading... |
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 Loading... |
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; |
OLD | NEW |