Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2021 The Chromium Authors |
Min Qin | 42484d7 | 2021-08-27 14:52:05 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_DOWNLOAD_ANDROID_DOWNLOAD_DIALOG_UTILS_H_ |
| 6 | #define CHROME_BROWSER_DOWNLOAD_ANDROID_DOWNLOAD_DIALOG_UTILS_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | #include "base/files/file_path.h" |
Ali Hijazi | e63cbaf6 | 2023-12-20 19:29:35 | [diff] [blame] | 12 | #include "base/memory/raw_ptr.h" |
Min Qin | 42484d7 | 2021-08-27 14:52:05 | [diff] [blame] | 13 | #include "chrome/browser/download/download_target_determiner_delegate.h" |
| 14 | #include "components/download/public/common/download_item.h" |
| 15 | #include "url/gurl.h" |
| 16 | |
| 17 | // Helper class for download dialogs. |
| 18 | class DownloadDialogUtils { |
| 19 | public: |
| 20 | // Helper method to find a download from a list of downloads based on its |
| 21 | // GUID, and remove it from the list. |
| 22 | static download::DownloadItem* FindAndRemoveDownload( |
Ali Hijazi | e63cbaf6 | 2023-12-20 19:29:35 | [diff] [blame] | 23 | std::vector<raw_ptr<download::DownloadItem, VectorExperimental>>* |
| 24 | downloads, |
Min Qin | 42484d7 | 2021-08-27 14:52:05 | [diff] [blame] | 25 | const std::string& download_guid); |
| 26 | |
|
|