Sniff MIME type for files which have unknown extensions.
What I want to do:
Open text files which have unknown extensions(e.g. access.log.1) using packaged apps which can handle 'text/plain'(e.g. Text, Caret,...).
Current situation:
By following reasons, text files with unknow extension can't be opened.
1. FileManager guess the MIME type as empty, so 'text/plain'-supporting apps are not shown as handlers.
2. PlatformAppLauncher guess the MIME type as 'application/octet-stream', and it launch apps with no data because those apps don't handle 'application/octet-stream'.
What I changed:
Modified FileManager and PlatformAppLauncher to sniff MIME types if they are unknown based on extensions.
BUG=352250
R=benwells@chromium.org, hashimoto@chromium.org, jorgelo@chromium.org
Review URL: https://codereview.chromium.org/224883008
Patch from Naoki Fukino <fukino@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264167 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed