Chromium Code Reviews
DescriptionMove download filename determination into a separate class.
* 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
Patch Set 1 : #
Total comments: 39
Patch Set 2 : Add comments #
Total comments: 30
Patch Set 3 : Address comments #
Total comments: 2
Patch Set 4 : Merge with r195576 #Patch Set 5 : Finer grained delegate methods. #Patch Set 6 : Get rid of download_file_picker_chromeos #
Total comments: 35
Patch Set 7 : Address comments. #
Total comments: 8
Patch Set 8 : Address comments. #Patch Set 9 : Merge with r197053 #Patch Set 10 : Fix tests #Patch Set 11 : Fix tests on Android #Messages
Total messages: 20 (0 generated)
|