OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ITEM_MODEL_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Rough percent complete. Returns -1 if the progress is unknown. | 73 // Rough percent complete. Returns -1 if the progress is unknown. |
74 int PercentComplete() const; | 74 int PercentComplete() const; |
75 | 75 |
76 // Is this considered a dangerous download? | 76 // Is this considered a dangerous download? |
77 bool IsDangerous() const; | 77 bool IsDangerous() const; |
78 | 78 |
79 // Is this considered a malicious download? Implies IsDangerous(). | 79 // Is this considered a malicious download? Implies IsDangerous(). |
80 bool IsMalicious() const; | 80 bool IsMalicious() const; |
81 | 81 |
| 82 // Is safe browsing download feedback feature available for this download? |
| 83 bool ShouldAllowDownloadFeedback() const; |
| 84 |
82 // Returns |true| if this download is expected to complete successfully and | 85 // Returns |true| if this download is expected to complete successfully and |
83 // thereafter be removed from the shelf. Downloads that are opened | 86 // thereafter be removed from the shelf. Downloads that are opened |
84 // automatically or are temporary will be removed from the shelf on successful | 87 // automatically or are temporary will be removed from the shelf on successful |
85 // completion. | 88 // completion. |
86 // | 89 // |
87 // Returns |false| if the download is not expected to complete (interrupted, | 90 // Returns |false| if the download is not expected to complete (interrupted, |
88 // cancelled, dangerous, malicious), or won't be removed on completion. | 91 // cancelled, dangerous, malicious), or won't be removed on completion. |
89 // | 92 // |
90 // Since the expectation of successful completion may change, the return value | 93 // Since the expectation of successful completion may change, the return value |
91 // of this function will change over the course of a download. | 94 // of this function will change over the course of a download. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 133 |
131 // The DownloadItem that this model represents. Note that DownloadItemModel | 134 // The DownloadItem that this model represents. Note that DownloadItemModel |
132 // itself shouldn't maintain any state since there can be more than one | 135 // itself shouldn't maintain any state since there can be more than one |
133 // DownloadItemModel in use with the same DownloadItem. | 136 // DownloadItemModel in use with the same DownloadItem. |
134 content::DownloadItem* download_; | 137 content::DownloadItem* download_; |
135 | 138 |
136 DISALLOW_COPY_AND_ASSIGN(DownloadItemModel); | 139 DISALLOW_COPY_AND_ASSIGN(DownloadItemModel); |
137 }; | 140 }; |
138 | 141 |
139 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ | 142 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ |
OLD | NEW |