| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Is this considered a dangerous download? | 84 // Is this considered a dangerous download? |
| 85 bool IsDangerous() const; | 85 bool IsDangerous() const; |
| 86 | 86 |
| 87 // Is this considered a malicious download? Implies IsDangerous(). | 87 // Is this considered a malicious download? Implies IsDangerous(). |
| 88 bool MightBeMalicious() const; | 88 bool MightBeMalicious() const; |
| 89 | 89 |
| 90 // Is this considered a malicious download with very high confidence? | 90 // Is this considered a malicious download with very high confidence? |
| 91 // Implies IsDangerous() and MightBeMalicious(). | 91 // Implies IsDangerous() and MightBeMalicious(). |
| 92 bool IsMalicious() const; | 92 bool IsMalicious() const; |
| 93 | 93 |
| 94 // Does this download have a MIME type (either explicit or inferred from its |
| 95 // extension) suggesting that it is a supported image type? |
| 96 bool HasSupportedImageMimeType() const; |
| 97 |
| 94 // Is safe browsing download feedback feature available for this download? | 98 // Is safe browsing download feedback feature available for this download? |
| 95 bool ShouldAllowDownloadFeedback() const; | 99 bool ShouldAllowDownloadFeedback() const; |
| 96 | 100 |
| 97 // Returns |true| if this download is expected to complete successfully and | 101 // Returns |true| if this download is expected to complete successfully and |
| 98 // thereafter be removed from the shelf. Downloads that are opened | 102 // thereafter be removed from the shelf. Downloads that are opened |
| 99 // automatically or are temporary will be removed from the shelf on successful | 103 // automatically or are temporary will be removed from the shelf on successful |
| 100 // completion. | 104 // completion. |
| 101 // | 105 // |
| 102 // Returns |false| if the download is not expected to complete (interrupted, | 106 // Returns |false| if the download is not expected to complete (interrupted, |
| 103 // cancelled, dangerous, malicious), or won't be removed on completion. | 107 // cancelled, dangerous, malicious), or won't be removed on completion. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 180 |
| 177 // The DownloadItem that this model represents. Note that DownloadItemModel | 181 // The DownloadItem that this model represents. Note that DownloadItemModel |
| 178 // itself shouldn't maintain any state since there can be more than one | 182 // itself shouldn't maintain any state since there can be more than one |
| 179 // DownloadItemModel in use with the same DownloadItem. | 183 // DownloadItemModel in use with the same DownloadItem. |
| 180 content::DownloadItem* download_; | 184 content::DownloadItem* download_; |
| 181 | 185 |
| 182 DISALLOW_COPY_AND_ASSIGN(DownloadItemModel); | 186 DISALLOW_COPY_AND_ASSIGN(DownloadItemModel); |
| 183 }; | 187 }; |
| 184 | 188 |
| 185 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ | 189 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H_ |
| OLD | NEW |