For Developers‎ > ‎Design Documents‎ > ‎

Temporary downloads

Bernhard Bauer (bauerb@chromium.org)

Draft – Last modified 07/16/2010

Goal:

Provide a nonintrusive way to open downloaded files with another application without permanently storing them on disk.

Advantages:

• Improve privacy
• Reduce download clutter

Use cases:

• Download and print sensitive documents without leaving a trace on the machine (More important as long as PDF viewing in Chrome isn't implemented, but even then still applicable for Word documents etc.)
• Download and extract archive files (or run installers, etc.) without storing both the archive and the extracted files on disk

Proposal:

• The UI metaphor we present to the user is that of an untitled document, which can be interacted with, saved and closed
• Store downloads in a download list that's logically separate from the files on disk and from which they can be opened, permanently saved to disk, or removed.
• Downloads are not removed from the download list/shelf, they are closed (using the same metaphor as closing a document in an editor)
• When removing a download that has not been saved, also delete the file on disk (but warn the user beforehand, similar to closing an untitled document without saving first)
• Separate list for incognito session with different rules and which is closed when closing the incognito session
• When the browser crashes, even downloads from incognito mode stay on disk and can be recovered, but the browser can also delete them (preferably asking the user first, something like "It looks like you have a temporarily downloaded file, would you like me to delete it?")
• Filter rules
    • Different behavior based on file type:
    • Automatically open certain file types
    • Saving behavior:
        • Always save
        • Warn before closing an unsaved file
        • Warn before closing an unsaved and unopened file
    • Automatically close files?
    • Different behavior for incognito mode (turn off auto-save)?
    • Default to the current behavior (Save all files, open certain files)

Under the hood:

• Downloaded files can be physically stored in /tmp or in a hidden folder inside the downloads folder
• Each download has its own folder (also helps w/ security issues)
• When closing/saving a download, move all files inside the folder to the downloads folder (so extracted files are also moved)

UI changes:

• Add "Download and open" menu item to context menu for links
• Add "unsaved" indicator to download item
• Add "Close" button to download item
• Add "Save" to context menu (maybe directly to the download item?)
• When closing an unsaved download, pop up dialog "You have an unsaved download. Do you want to save it?" -- "Save", "Don't Save", "Cancel" and "Remember my choice for this type of file"

Stuff that can be done in M7:

• Move unfinished downloads to separate area
• Add code path to delete downloads

Example workflow:

• User downloads a bunch of Word documents in incognito mode
• Opens them from the download list and prints them
• Closes the incognito window, which closes all downloads
• User is asked to save unsaved downloads, otherwise they are automatically deleted

Applicable bugs:

http://crbug.com/333

Comments