| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 networkRequest.setRequestHeadersText(response.requestHeadersText ||
""); | 198 networkRequest.setRequestHeadersText(response.requestHeadersText ||
""); |
| 199 } | 199 } |
| 200 | 200 |
| 201 networkRequest.connectionReused = response.connectionReused; | 201 networkRequest.connectionReused = response.connectionReused; |
| 202 networkRequest.connectionId = response.connectionId; | 202 networkRequest.connectionId = response.connectionId; |
| 203 if (response.remoteIPAddress) | 203 if (response.remoteIPAddress) |
| 204 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r
emotePort || -1); | 204 networkRequest.setRemoteAddress(response.remoteIPAddress, response.r
emotePort || -1); |
| 205 | 205 |
| 206 if (response.fromServiceWorker) | 206 if (response.fromServiceWorker) |
| 207 networkRequest.fetchedViaServiceWorker = true; | 207 networkRequest.fetchedViaServiceWorker = true; |
| 208 else if (response.fromDiskCache) | 208 |
| 209 if (response.fromDiskCache) |
| 209 networkRequest.cached = true; | 210 networkRequest.cached = true; |
| 210 else | 211 else |
| 211 networkRequest.timing = response.timing; | 212 networkRequest.timing = response.timing; |
| 212 | 213 |
| 213 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { | 214 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { |
| 214 var consoleModel = this._manager._target.consoleModel; | 215 var consoleModel = this._manager._target.consoleModel; |
| 215 consoleModel.addMessage(new WebInspector.ConsoleMessage(consoleModel
.target(), WebInspector.ConsoleMessage.MessageSource.Network, | 216 consoleModel.addMessage(new WebInspector.ConsoleMessage(consoleModel
.target(), WebInspector.ConsoleMessage.MessageSource.Network, |
| 216 WebInspector.ConsoleMessage.MessageLevel.Log, | 217 WebInspector.ConsoleMessage.MessageLevel.Log, |
| 217 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), | 218 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), |
| 218 WebInspector.ConsoleMessage.MessageType.Log, | 219 WebInspector.ConsoleMessage.MessageType.Log, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 * @param {string} documentURL | 567 * @param {string} documentURL |
| 567 * @param {!NetworkAgent.Initiator} initiator | 568 * @param {!NetworkAgent.Initiator} initiator |
| 568 */ | 569 */ |
| 569 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU
RL, initiator) | 570 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU
RL, initiator) |
| 570 { | 571 { |
| 571 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ
et, requestId, url, documentURL, frameId, loaderId); | 572 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ
et, requestId, url, documentURL, frameId, loaderId); |
| 572 networkRequest.initiator = initiator; | 573 networkRequest.initiator = initiator; |
| 573 return networkRequest; | 574 return networkRequest; |
| 574 } | 575 } |
| 575 } | 576 } |
| OLD | NEW |