Register chrome://media-app as handling RAW image file types.
More accurately, this just hides the codepath that would redirect files sniffed as "image/tiff" back to the old gallery app if the file had an extension matching a known RAW image format. (chrome://media-app was already a handler for "image/*", so logic was needed to exclude RAW). However, it also adds explicit extension-match file handlers to the web app manifest to handle cases where sniffing is not done. Initially tried sharing the logic that drives `IsRawFile()` in the files app's file_tasks but that's not really compatible with the web app manifest, and `IsRawFile` can just be deleted soon. Encapsulate IsRawFile() to make that removal easier: nothing outside file_tasks.cc uses it since r777758. The logic is put behind a base::Feature, but not a chrome://flag: usage of this is low and the change is low-risk. And flipping chrome://flags#media-app also works to use the old gallery for these file types. Bug: 1030935, b/154062029 Change-Id: I4779f76fa81800ffef316748cb94e12534b38775 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494404Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#820645}
Showing
Please register or sign in to comment