Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: chrome/browser/download/download_request_infobar_delegate.h

Issue 289083004: infobars: Componentize ConfirmInfoBarDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/download/download_request_limiter.h" 10 #include "chrome/browser/download/download_request_limiter.h"
11 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 11 #include "components/infobars/core/confirm_infobar_delegate.h"
12 12
13 class InfoBarService; 13 class InfoBarService;
14 14
15 // An infobar delegate that presents the user with a choice to allow or deny 15 // An infobar delegate that presents the user with a choice to allow or deny
16 // multiple downloads from the same site. This confirmation step protects 16 // multiple downloads from the same site. This confirmation step protects
17 // against "carpet-bombing", where a malicious site forces multiple downloads 17 // against "carpet-bombing", where a malicious site forces multiple downloads
18 // on an unsuspecting user. 18 // on an unsuspecting user.
19 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate { 19 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate {
20 public: 20 public:
21 typedef base::Callback<void( 21 typedef base::Callback<void(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual bool Accept() OVERRIDE; 53 virtual bool Accept() OVERRIDE;
54 virtual bool Cancel() OVERRIDE; 54 virtual bool Cancel() OVERRIDE;
55 55
56 bool responded_; 56 bool responded_;
57 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host_; 57 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate); 59 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ 62 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/api/debugger/debugger_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698