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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 2712833002: DevTools: Show decoded body length for network requests on timeline. (Closed)
Patch Set: rebaseline Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index c25724670b7d529cec8840f6bced4d464dad5b2e..8cc06a91535a3f19c683323b7615a33516abee09 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -802,7 +802,11 @@ Timeline.TimelineUIUtils = class {
}
if (eventData['encodedDataLength']) {
contentHelper.appendTextRow(
- Common.UIString('Encoded Data Length'), Common.UIString('%d Bytes', eventData['encodedDataLength']));
+ Common.UIString('Encoded Data'), Common.UIString('%d Bytes', eventData['encodedDataLength']));
+ }
+ if (eventData['decodedBodyLength']) {
+ contentHelper.appendTextRow(
+ Common.UIString('Decoded Body'), Common.UIString('%d Bytes', eventData['decodedBodyLength']));
}
break;
case recordTypes.CompileScript:
@@ -1100,12 +1104,14 @@ Timeline.TimelineUIUtils = class {
contentHelper.appendTextRow(Common.UIString('Mime Type'), request.mimeType);
var lengthText = '';
if (request.fromCache)
- lengthText += Common.UIString('(from cache) ');
+ lengthText += Common.UIString(' (from cache)');
if (request.fromServiceWorker)
- lengthText += Common.UIString('(from service worker)');
+ lengthText += Common.UIString(' (from service worker)');
if (request.encodedDataLength || !lengthText)
- lengthText = `${Number.bytesToString(request.encodedDataLength)} ${lengthText}`;
- contentHelper.appendTextRow(Common.UIString('Encoded Length'), lengthText);
+ lengthText = `${Number.bytesToString(request.encodedDataLength)}${lengthText}`;
+ contentHelper.appendTextRow(Common.UIString('Encoded Data'), lengthText);
+ if (request.decodedBodyLength)
+ contentHelper.appendTextRow(Common.UIString('Decoded Body'), Number.bytesToString(request.decodedBodyLength));
const title = Common.UIString('Initiator');
const sendRequest = request.children[0];
const topFrame = TimelineModel.TimelineData.forEvent(sendRequest).topFrame();

Powered by Google App Engine
This is Rietveld 408576698