• Devlin Cronin's avatar
    [Extensions] Change Mime-Type deducation in URLRequestExtensionJob · aed0e542
    Devlin Cronin authored
    Modify URLRequestExtensionJob to determine the mime type of a requested
    file through net::GetWellKnownMimeTypeFromExtension(), rather than
    URLRequestFileJob::GetMimeType(). The difference here is that the latter
    will include platform-specific modifications. This means that if another
    application on the users machine specified a different mime type for an
    extension, that type would be used.
    
    This causes problems with modules in extensions, in the cases where a
    different application has set a different mime type for .js files, since
    modules have strict mime type requirements.
    
    Use GetWellKnownMimeTypeFromExtension(), and add .js to the list of
    primary mappings in mime_util.cc.
    
    Bug: 797712
    
    Change-Id: I27fea0479268520abd08fb62a501d213a3a04f52
    Reviewed-on: https://chromium-review.googlesource.com/885401Reviewed-by: default avatarAsanka Herath <asanka@chromium.org>
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#532070}
    aed0e542
mime_util.cc 24.6 KB