DescriptionOption-click to download should not display "Save As" UI.
The download manager has a concept of a request originating from the "Save As..." contextual menu v.s. a direct download request from the renderer, however this was't hooked up.
The Download Manager uses boolean variables named "save_as" in various locations to track whether a download originated via a contextual menu selection (in which case the save panel should be displayed) or via a renderer request (in which case no UI should be displayed).
This CL contains 3 distinct changes:
1. DownloadFileManager::OnDownloadURL() is where downloads originating from the contextual menu are dispatched, set save_as to true if the download starts here.
2. ResourceMessageFilter::OnDownloadURL() is where downloads originating from the renderer are dispatched (e.g. option-click), don't display UI for these.
3. The "save_as" variable in the DownloadCreateInfo structure doesn't really reflect the origin of the request but whether the Save panel should be displayed. This can happen for example on a name collision or if the default download location isn't writeable regardless of the action that initiated the download. Renamed the variable and added documentation to this effect.
BUG=36775
TEST=Option-click an image, the image should be saved without prompting the user for a download locate. Save an image via the "Save As..." context menu, you should be prompted for the save location.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52848
Patch Set 1 #
Total comments: 1
Messages
Total messages: 2 (0 generated)
|