OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
9 #include "chrome/browser/download/download_request_limiter.h" | 10 #include "chrome/browser/download/download_request_limiter.h" |
10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | |
11 | 11 |
12 // An infobar delegate that presents the user with a choice to allow or deny | 12 // An infobar delegate that presents the user with a choice to allow or deny |
13 // multiple downloads from the same site. This confirmation step protects | 13 // multiple downloads from the same site. This confirmation step protects |
14 // against "carpet-bombing", where a malicious site forces multiple downloads | 14 // against "carpet-bombing", where a malicious site forces multiple downloads |
15 // on an unsuspecting user. | 15 // on an unsuspecting user. |
16 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate { | 16 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate { |
17 public: | 17 public: |
18 DownloadRequestInfoBarDelegate( | 18 DownloadRequestInfoBarDelegate( |
19 InfoBarTabHelper* infobar_helper, | 19 InfoBarTabHelper* infobar_helper, |
20 DownloadRequestLimiter::TabDownloadState* host); | 20 DownloadRequestLimiter::TabDownloadState* host); |
(...skipping 10 matching lines...) Expand all Loading... |
31 virtual string16 GetMessageText() const OVERRIDE; | 31 virtual string16 GetMessageText() const OVERRIDE; |
32 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 32 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
33 virtual bool Accept() OVERRIDE; | 33 virtual bool Accept() OVERRIDE; |
34 | 34 |
35 DownloadRequestLimiter::TabDownloadState* host_; | 35 DownloadRequestLimiter::TabDownloadState* host_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate); |
38 }; | 38 }; |
39 | 39 |
40 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ | 40 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ |
OLD | NEW |