
There are the following two functions in net/base/mime_util.h which are used to deduce mime types from file extensions: - GetMimeTypeFromExtension - GetWellKnownMimeTypeFromExtension A common usage for these functions is to deduce the mime type of a given file path. There's the GetMimeTypeFromFile convenience function that extracts the file extension from the given path and calls GetMimeTypeFromExtension, but there's no similar function for GetWellKnownMimeTypeFromExtension. The change adds such a function, and simplifies some relevant code by using it. Bug: 400647848 Change-Id: I55c2c44f9baae978a62d867935fb7c328ce77738 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6316832 Reviewed-by: David Black <dmblack@google.com> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Reviewed-by: Richard (Torne) Coles <torne@chromium.org> Commit-Queue: Michael Maltsev (R&D) <michaelm@island.io> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Simeon Anfinrud <sanfin@chromium.org> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1433940}
FileSystem API
This directory contains part of the browser side implementation of various filesystem related APIs.
Related directories
//storage/browser/file_system/
contains the
rest of the browser side implementation, while
blink/renderer/modules/filesystem
contains the renderer side implementation and
blink/public/mojom/filesystem
contains the mojom interfaces for these APIs.
In this directory
FileSystemManagerImpl
is the main entry point
for calls from the renderer, it mostly redirects incoming mojom calls to a
storage::FileSystemContext
instance.