Chromium Code Reviews
DescriptionMove download filename determination into a separate class.
[Relanding. It was reverted due to a memory leak.]
* Extracts download filename determination into
DownloadTargetDeterminer. The new class maintains state and observes
the download. Doing so eliminates the need to pass state around as
bound arguments.
* Guarantees that the completion callback to
DownloadManagerDelegate::DetermineDownloadTarget is always invoked,
even if the download is interrupted on initialization. This is
required for reliably resuming downloads.
* The DownloadFilePicker always returns the virtual path for downloads
to Drive. ChromeDownloadManagerDelegate can use it to keep track of
the correct last selected directory for 'Save As' downloads.
* Since no path subsubstituion is necessary during prompting,
DownloadFilePickerChromeOS is no longer necessary.
* Re-orders the sequence of events so that the user is prompted as early
as possible. Expensive history database lookups won't introduce
unnecssary jank.
* History database lookups are only performed if the results of the
lookup are necessary.
* Downloads to Drive don't need the temporary local path to be
determined twice when the default downloads directory is Drive.
BUG=151618
BUG=104335
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=197518
Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=197578
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=197920
Patch Set 1 #Patch Set 2 : Wait until callback is done #Patch Set 3 : No ALLOW_THIS_IN_INITIALIZER_LIST #Patch Set 4 : #
Total comments: 1
Messages
Total messages: 13 (0 generated)
|