commit | ebe0192165803c67f2332ffac0446d5584ebff25 | [log] [tgz] |
---|---|---|
author | Simon Zünd <[email protected]> | Thu Jan 18 10:11:58 2024 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jan 18 11:28:33 2024 |
tree | bcb8aa5a5fcee218dd454f23c0bf9cdb23b0cfd1 | |
parent | f5538f03a9133dca40a7ad24e79f51a150b99578 [diff] [blame] |
[cleanup] Remove ResourceType from ContentData class We only required it to determine if a ContentData is textual content or not. The MIME type conveys the same information. To this end this CL introduces a hard-coded list of MIME types that have textual content besides "text/*". This is somewhat cleaner, as ContentData now bundles the minimal information to pass around bytes in the frontend: The raw data, the mime type and a character encoding. [email protected] Bug: 1509336 Change-Id: I70061a263c0a18ebc7c435bdb611164ec9363e84 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5210350 Reviewed-by: Wolfgang Beyer <[email protected]> Commit-Queue: Simon Zünd <[email protected]>
diff --git a/front_end/panels/network/NetworkLogView.ts b/front_end/panels/network/NetworkLogView.ts index fbc435e..4cee999 100644 --- a/front_end/panels/network/NetworkLogView.ts +++ b/front_end/panels/network/NetworkLogView.ts
@@ -870,7 +870,7 @@ let content: string; if (SDK.ContentData.ContentData.isError(contentData)) { content = ''; - } else if (!contentData.resourceType.isTextType()) { + } else if (!contentData.isTextContent) { content = contentData.asDataUrl() ?? ''; } else { content = contentData.text;