Do-not-ignore-download-location-prompt-setting.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: csagan5 <32685696+csagan5@users.noreply.github.com>
  2. Date: Sun, 20 Jan 2019 06:20:10 +0100
  3. Subject: Do not ignore download location prompt setting
  4. Upstream has decided that it works as intended (https://bugs.chromium.org/p/chromium/issues/detail?id=916606)
  5. but users would like to decide where to save a file even when there is no SD card available;
  6. do not skip the prompt in such cases.
  7. Do not tick "Don't show again" by default
  8. ---
  9. .../DownloadLocationDialogCoordinator.java | 15 ---------------
  10. 1 file changed, 15 deletions(-)
  11. diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
  12. --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
  13. +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
  14. @@ -132,21 +132,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
  15. * @param dirs An list of available download directories.
  16. */
  17. private void onDirectoryOptionsRetrieved(ArrayList<DirectoryOption> dirs) {
  18. - // If there is only one directory available, don't show the default dialog, and set the
  19. - // download directory to default. Dialog will still show for other types of dialogs, like
  20. - // name conflict or disk error or if Incognito download warning is needed.
  21. - if (dirs.size() == 1 && !mLocationDialogManaged
  22. - && mDialogType == DownloadLocationDialogType.DEFAULT
  23. - && !shouldShowIncognitoWarning()) {
  24. - final DirectoryOption dir = dirs.get(0);
  25. - if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) {
  26. - assert (!TextUtils.isEmpty(dir.location));
  27. - DownloadDialogBridge.setDownloadAndSaveFileDefaultDirectory(dir.location);
  28. - mController.onDownloadLocationDialogComplete(mSuggestedPath);
  29. - }
  30. - return;
  31. - }
  32. -
  33. // Already showing the dialog.
  34. if (mDialogModel != null) return;
  35. --
  36. 2.20.1