| 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 // File method ordering: Methods in this file are in the same order as | 5 // File method ordering: Methods in this file are in the same order as |
| 6 // in download_item_impl.h, with the following exception: The public | 6 // in download_item_impl.h, with the following exception: The public |
| 7 // interface Start is placed in chronological order with the other | 7 // interface Start is placed in chronological order with the other |
| 8 // (private) routines that together define a DownloadItem's state | 8 // (private) routines that together define a DownloadItem's state |
| 9 // transitions as the download progresses. See "Download progression | 9 // transitions as the download progresses. See "Download progression |
| 10 // cascade" later in this file. | 10 // cascade" later in this file. |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 } | 609 } |
| 610 | 610 |
| 611 bool DownloadItemImpl::IsDangerous() const { | 611 bool DownloadItemImpl::IsDangerous() const { |
| 612 #if defined(OS_WIN) | 612 #if defined(OS_WIN) |
| 613 // TODO(noelutz): At this point only the windows views UI supports | 613 // TODO(noelutz): At this point only the windows views UI supports |
| 614 // warnings based on dangerous content. | 614 // warnings based on dangerous content. |
| 615 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 615 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
| 616 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || | 616 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || |
| 617 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || | 617 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || |
| 618 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || | 618 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || |
| 619 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST); | 619 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST || |
| 620 danger_type_ == DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED); |
| 620 #else | 621 #else |
| 621 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 622 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
| 622 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); | 623 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); |
| 623 #endif | 624 #endif |
| 624 } | 625 } |
| 625 | 626 |
| 626 DownloadDangerType DownloadItemImpl::GetDangerType() const { | 627 DownloadDangerType DownloadItemImpl::GetDangerType() const { |
| 627 return danger_type_; | 628 return danger_type_; |
| 628 } | 629 } |
| 629 | 630 |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 case RESUME_MODE_USER_CONTINUE: | 1682 case RESUME_MODE_USER_CONTINUE: |
| 1682 return "USER_CONTINUE"; | 1683 return "USER_CONTINUE"; |
| 1683 case RESUME_MODE_USER_RESTART: | 1684 case RESUME_MODE_USER_RESTART: |
| 1684 return "USER_RESTART"; | 1685 return "USER_RESTART"; |
| 1685 } | 1686 } |
| 1686 NOTREACHED() << "Unknown resume mode " << mode; | 1687 NOTREACHED() << "Unknown resume mode " << mode; |
| 1687 return "unknown"; | 1688 return "unknown"; |
| 1688 } | 1689 } |
| 1689 | 1690 |
| 1690 } // namespace content | 1691 } // namespace content |
| OLD | NEW |