Add 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

Review URL: https://codereview.chromium.org/1274433003

Cr-Commit-Position: refs/heads/master@{#341998}


CrOS-Libchrome-Original-Commit: 669dda3d77f4ba264569fa37e7f12aa3fffd4df1
8 files changed
tree: 7e63e71893c61e60408f0b81513332c50d327588
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/