OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PERMISSION_REQUEST_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PERMISSION_REQUEST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/macros.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/ui/website_settings/permission_bubble_request.h" | 11 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" |
12 | 12 |
13 // A permission bubble request that presents the user with a choice to allow | 13 // A permission bubble request that presents the user with a choice to allow |
14 // or deny multiple downloads from the same site. This confirmation step | 14 // or deny multiple downloads from the same site. This confirmation step |
15 // protects against "carpet-bombing", where a malicious site forces multiple | 15 // protects against "carpet-bombing", where a malicious site forces multiple |
16 // downloads on an unsuspecting user. | 16 // downloads on an unsuspecting user. |
17 class DownloadPermissionRequest : public PermissionBubbleRequest { | 17 class DownloadPermissionRequest : public PermissionBubbleRequest { |
18 public: | 18 public: |
(...skipping 13 matching lines...) Expand all Loading... |
32 void RequestFinished() override; | 32 void RequestFinished() override; |
33 | 33 |
34 private: | 34 private: |
35 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host_; | 35 base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host_; |
36 GURL request_url_; | 36 GURL request_url_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(DownloadPermissionRequest); | 38 DISALLOW_COPY_AND_ASSIGN(DownloadPermissionRequest); |
39 }; | 39 }; |
40 | 40 |
41 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PERMISSION_REQUEST_H_ | 41 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PERMISSION_REQUEST_H_ |
OLD | NEW |