DescriptionAdd GetMimeTypeFromFile to Mojo's network service.
This allows loading file:// URLs as html (etc.) content.
This resolves https://codereview.chromium.org/1268993003 TODO.
It's also a compromise of the following requirements:
1) Use net/base/mime_util.* to infer MIME from file paths.
(we want a single robust and consistent inference of MIME types)
2) Do not move the mime_util code out of src/net.
(net can't depend on components; this code doesn't belong in base)
3) Avoid using the network service to load file URLs.
(we want to avoid file system access by the network service)
BUG=513779
TEST=Mojo and Mandoline handle html (etc.) file URLs as expected.
R=jam@chromium.org
Committed: https://crrev.com/669dda3d77f4ba264569fa37e7f12aa3fffd4df1
Cr-Commit-Position: refs/heads/master@{#341998}
Patch Set 1 #Patch Set 2 : Cleanup. #Patch Set 3 : Fix Windows compile error. #Patch Set 4 : Fix string usage and NativeApplicationLoaderTest. #
Messages
Total messages: 18 (7 generated)
|