| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 if (typeof eventData['statusCode'] === 'number') | 795 if (typeof eventData['statusCode'] === 'number') |
| 796 contentHelper.appendTextRow(Common.UIString('Status Code'), eventData[
'statusCode']); | 796 contentHelper.appendTextRow(Common.UIString('Status Code'), eventData[
'statusCode']); |
| 797 if (eventData['mimeType']) | 797 if (eventData['mimeType']) |
| 798 contentHelper.appendTextRow(Common.UIString('MIME Type'), eventData['m
imeType']); | 798 contentHelper.appendTextRow(Common.UIString('MIME Type'), eventData['m
imeType']); |
| 799 if ('priority' in eventData) { | 799 if ('priority' in eventData) { |
| 800 var priority = NetworkConditions.uiLabelForPriority(eventData['priorit
y']); | 800 var priority = NetworkConditions.uiLabelForPriority(eventData['priorit
y']); |
| 801 contentHelper.appendTextRow(Common.UIString('Priority'), priority); | 801 contentHelper.appendTextRow(Common.UIString('Priority'), priority); |
| 802 } | 802 } |
| 803 if (eventData['encodedDataLength']) { | 803 if (eventData['encodedDataLength']) { |
| 804 contentHelper.appendTextRow( | 804 contentHelper.appendTextRow( |
| 805 Common.UIString('Encoded Data Length'), Common.UIString('%d Bytes'
, eventData['encodedDataLength'])); | 805 Common.UIString('Encoded Data'), Common.UIString('%d Bytes', event
Data['encodedDataLength'])); |
| 806 } |
| 807 if (eventData['decodedBodyLength']) { |
| 808 contentHelper.appendTextRow( |
| 809 Common.UIString('Decoded Body'), Common.UIString('%d Bytes', event
Data['decodedBodyLength'])); |
| 806 } | 810 } |
| 807 break; | 811 break; |
| 808 case recordTypes.CompileScript: | 812 case recordTypes.CompileScript: |
| 809 case recordTypes.EvaluateScript: | 813 case recordTypes.EvaluateScript: |
| 810 var url = eventData && eventData['url']; | 814 var url = eventData && eventData['url']; |
| 811 if (url) { | 815 if (url) { |
| 812 contentHelper.appendLocationRow( | 816 contentHelper.appendLocationRow( |
| 813 Common.UIString('Script'), url, eventData['lineNumber'], eventData
['columnNumber']); | 817 Common.UIString('Script'), url, eventData['lineNumber'], eventData
['columnNumber']); |
| 814 } | 818 } |
| 815 break; | 819 break; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 contentHelper.appendTextRow(Common.UIString('Request Method'), request.req
uestMethod); | 1097 contentHelper.appendTextRow(Common.UIString('Request Method'), request.req
uestMethod); |
| 1094 if (typeof request.priority === 'string') { | 1098 if (typeof request.priority === 'string') { |
| 1095 const priority = | 1099 const priority = |
| 1096 NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.Reso
urcePriority} */ (request.priority)); | 1100 NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.Reso
urcePriority} */ (request.priority)); |
| 1097 contentHelper.appendTextRow(Common.UIString('Priority'), priority); | 1101 contentHelper.appendTextRow(Common.UIString('Priority'), priority); |
| 1098 } | 1102 } |
| 1099 if (request.mimeType) | 1103 if (request.mimeType) |
| 1100 contentHelper.appendTextRow(Common.UIString('Mime Type'), request.mimeType
); | 1104 contentHelper.appendTextRow(Common.UIString('Mime Type'), request.mimeType
); |
| 1101 var lengthText = ''; | 1105 var lengthText = ''; |
| 1102 if (request.fromCache) | 1106 if (request.fromCache) |
| 1103 lengthText += Common.UIString('(from cache) '); | 1107 lengthText += Common.UIString(' (from cache)'); |
| 1104 if (request.fromServiceWorker) | 1108 if (request.fromServiceWorker) |
| 1105 lengthText += Common.UIString('(from service worker)'); | 1109 lengthText += Common.UIString(' (from service worker)'); |
| 1106 if (request.encodedDataLength || !lengthText) | 1110 if (request.encodedDataLength || !lengthText) |
| 1107 lengthText = `${Number.bytesToString(request.encodedDataLength)} ${lengthT
ext}`; | 1111 lengthText = `${Number.bytesToString(request.encodedDataLength)}${lengthTe
xt}`; |
| 1108 contentHelper.appendTextRow(Common.UIString('Encoded Length'), lengthText); | 1112 contentHelper.appendTextRow(Common.UIString('Encoded Data'), lengthText); |
| 1113 if (request.decodedBodyLength) |
| 1114 contentHelper.appendTextRow(Common.UIString('Decoded Body'), Number.bytesT
oString(request.decodedBodyLength)); |
| 1109 const title = Common.UIString('Initiator'); | 1115 const title = Common.UIString('Initiator'); |
| 1110 const sendRequest = request.children[0]; | 1116 const sendRequest = request.children[0]; |
| 1111 const topFrame = TimelineModel.TimelineData.forEvent(sendRequest).topFrame()
; | 1117 const topFrame = TimelineModel.TimelineData.forEvent(sendRequest).topFrame()
; |
| 1112 if (topFrame) { | 1118 if (topFrame) { |
| 1113 const link = linkifier.maybeLinkifyConsoleCallFrame(target, topFrame); | 1119 const link = linkifier.maybeLinkifyConsoleCallFrame(target, topFrame); |
| 1114 if (link) | 1120 if (link) |
| 1115 contentHelper.appendElementRow(title, link); | 1121 contentHelper.appendElementRow(title, link); |
| 1116 } else { | 1122 } else { |
| 1117 const initiator = TimelineModel.TimelineData.forEvent(sendRequest).initiat
or(); | 1123 const initiator = TimelineModel.TimelineData.forEvent(sendRequest).initiat
or(); |
| 1118 if (initiator) { | 1124 if (initiator) { |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 * @param {string=} warningType | 2302 * @param {string=} warningType |
| 2297 */ | 2303 */ |
| 2298 appendWarningRow(event, warningType) { | 2304 appendWarningRow(event, warningType) { |
| 2299 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); | 2305 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); |
| 2300 if (warning) | 2306 if (warning) |
| 2301 this.appendElementRow(Common.UIString('Warning'), warning, true); | 2307 this.appendElementRow(Common.UIString('Warning'), warning, true); |
| 2302 } | 2308 } |
| 2303 }; | 2309 }; |
| 2304 | 2310 |
| 2305 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo
wnCache'); | 2311 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo
wnCache'); |
| OLD | NEW |