WebApps: Register MIME types when web app installed on Linux.
In Linux, an association between an app and a particular file is made on the basis of the file's MIME type. Where an app supports handling MIME types that aren't known to the OS, those types must be registered calling `xdg-mime` [1] on an XML file containing a mapping of MIME types to file extensions per the freedesktop.org Shared MIME-info Database specification [2]. This CL implements methods for generating a compliant XML file from a set of file handlers, writing it to a temp file, and calling `xdg-mime` on that file to register the new MIME types. These are invoked as part of the web app install process on Linux. [1] https://linux.die.net/man/1/xdg-mime [2] https://freedesktop.org/standards/shared-mime-info Bug: 938103 Change-Id: If7e4cb0063e1688cb69d2b2b503235658c087366 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2101398 Commit-Queue: Robert Woods <robertwoods@google.com> Reviewed-by:Alan Cutter <alancutter@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#751938}
Showing
Please register or sign in to comment