Download-on-Android-Q-Remove-a-DCHECK-in-CreateReservation.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. From: Xing Liu <xingliu@chromium.org>
  2. Date: Tue, 18 Feb 2020 21:10:54 +0000
  3. Subject: Download on Android Q: Remove a DCHECK in CreateReservation.
  4. When resuming a download, the suggested path can be content URI. This
  5. will hit a DCHECK in CreateReservation.
  6. Bug: 1045642
  7. Change-Id: I61c452afafbbc9606f747c84ff18e6b9dc9a0fb6
  8. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062759
  9. Reviewed-by: Min Qin <qinmin@chromium.org>
  10. Commit-Queue: Xing Liu <xingliu@chromium.org>
  11. Cr-Commit-Position: refs/heads/master@{#742270}
  12. ---
  13. .../internal/common/download_path_reservation_tracker.cc | 2 --
  14. 1 file changed, 2 deletions(-)
  15. diff --git a/components/download/internal/common/download_path_reservation_tracker.cc b/components/download/internal/common/download_path_reservation_tracker.cc
  16. --- a/components/download/internal/common/download_path_reservation_tracker.cc
  17. +++ b/components/download/internal/common/download_path_reservation_tracker.cc
  18. @@ -326,8 +326,6 @@ PathValidationResult ValidatePathAndResolveConflicts(
  19. // - Returns the result of creating the path reservation.
  20. PathValidationResult CreateReservation(const CreateReservationInfo& info,
  21. base::FilePath* reserved_path) {
  22. - DCHECK(info.suggested_path.IsAbsolute());
  23. -
  24. // Create a reservation map if one doesn't exist. It will be automatically
  25. // deleted when all the reservations are revoked.
  26. if (g_reservation_map == NULL)
  27. --
  28. 2.17.1