DescriptionRevert 233460 "Prefer opening PDF downloads in the browser."
Caused "PluginPrefsTest.UnifiedPepperFlashState" failure on "Linux Clang (dbg)"
BUG=316017
> Prefer opening PDF downloads in the browser.
>
> PDFs in particular are safer to open in the browser. This patch changes
> the handling of downloads to open such files in the browser by default
> instead of the system handler for the file type. A "Open with system
> handler" menu item will be available so that users can still use the
> system application if needed.
>
> The determination that a file is safer to handle in the browser is done
> as follows:
>
> a) DownloadTargetDeterminer determines whether the MIME type
> corresponding to the target filename of the download is one which is
> handled by the renderer or one that is handled by a sandboxed pepper
> plugin. If so, then the file is considered safely handled by the
> browser.
>
> b) ChromeDownloadManagerDelegate determines whether opening in the
> browser is preferred for the file type assuming the browser is able
> to handle it safely. Currently this is true for .pdf files.
>
> Opening behavior for a download will default to opening in the browser
> if both results from a) and b) are true.
>
> BUG=148492
>
> TEST=(1) Make sure Chrome PDF Viewer is enabled in chrome://plugins.
> (2) Download a .pdf file.
> (3) Download shelf context menu should show "Open" and "Open with
> system handler" options.
> (4) "Open" as well as clicking on the shelf icon and clicking on
> the download in chrome://downloads should all result in opening
> the file within the browser.
> (5) "Open with system handler" should open the .pdf with the
> application that's set up as the default handler for .pdf files
> on the users' machine.
>
> Review URL: https://codereview.chromium.org/55063002
TBR=asanka@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233497
Patch Set 1 #Messages
Total messages: 2 (0 generated)
|