Chromium Code Reviews| Index: chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.h |
| diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.h b/chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.h |
| index 0442df07648d645571109a5990888b05e4d351c8..b748879a3ec685fe3e8d298e0ea448c29f3e990b 100644 |
| --- a/chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.h |
| +++ b/chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.h |
| @@ -18,17 +18,22 @@ namespace offline_pages { |
| class OfflinePageInfoBarDelegate |
| : public chrome::android::DownloadOverwriteInfoBarDelegate { |
| public: |
| + enum class Action { CONFIRM, OVERWRITE }; |
|
fgorski
2016/10/10 18:08:21
s/CONFIRM/CREATE_NEW/
Logically both are confirma
|
| + |
| // Creates an offline page infobar and a delegate and adds the infobar to the |
| // InfoBarService associated with |web_contents|. |page_name| is the name |
| // shown for this file in the infobar text. |
| - static void Create(const base::Closure& confirm_continuation, |
| + static void Create(const base::Callback<void(Action)>& confirm_continuation, |
| + const std::string& downloads_label, |
| const std::string& page_name, |
| content::WebContents* web_contents); |
| ~OfflinePageInfoBarDelegate() override; |
| private: |
| - OfflinePageInfoBarDelegate(const base::Closure& confirm_continuation, |
| - const std::string& page_name); |
| + OfflinePageInfoBarDelegate( |
| + const base::Callback<void(Action)>& confirm_continuation, |
| + const std::string& downloads_label, |
| + const std::string& page_name); |
| // DownloadOverwriteInfoBarDelegate: |
| infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| @@ -42,8 +47,9 @@ class OfflinePageInfoBarDelegate |
| OfflinePageInfoBarDelegate* AsOfflinePageInfoBarDelegate() override; |
| // Continuation called when the user chooses to create a new file. |
| - base::Closure confirm_continuation_; |
| + base::Callback<void(Action)> confirm_continuation_; |
| + std::string downloads_label_; |
| std::string page_name_; |
| DISALLOW_COPY_AND_ASSIGN(OfflinePageInfoBarDelegate); |