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 = String(response.connectionId); | 202 networkRequest.connectionId = String(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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 * @param {!NetworkAgent.LoaderId} loaderId | 566 * @param {!NetworkAgent.LoaderId} loaderId |
566 * @param {string} url | 567 * @param {string} url |
567 * @param {string} documentURL | 568 * @param {string} documentURL |
568 * @param {?NetworkAgent.Initiator} initiator | 569 * @param {?NetworkAgent.Initiator} initiator |
569 */ | 570 */ |
570 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU
RL, initiator) | 571 _createNetworkRequest: function(requestId, frameId, loaderId, url, documentU
RL, initiator) |
571 { | 572 { |
572 return new WebInspector.NetworkRequest(this._manager._target, requestId,
url, documentURL, frameId, loaderId, initiator); | 573 return new WebInspector.NetworkRequest(this._manager._target, requestId,
url, documentURL, frameId, loaderId, initiator); |
573 } | 574 } |
574 } | 575 } |
OLD | NEW |