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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 return file_externally_removed_; | 592 return file_externally_removed_; |
593 } | 593 } |
594 | 594 |
595 bool DownloadItemImpl::IsDangerous() const { | 595 bool DownloadItemImpl::IsDangerous() const { |
596 #ifdef OS_WIN | 596 #ifdef OS_WIN |
597 // TODO(noelutz): At this point only the windows views UI supports | 597 // TODO(noelutz): At this point only the windows views UI supports |
598 // warnings based on dangerous content. | 598 // warnings based on dangerous content. |
599 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 599 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
600 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || | 600 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || |
601 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || | 601 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || |
602 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT); | 602 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || |
| 603 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST); |
603 #else | 604 #else |
604 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 605 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
605 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); | 606 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); |
606 #endif | 607 #endif |
607 } | 608 } |
608 | 609 |
609 DownloadDangerType DownloadItemImpl::GetDangerType() const { | 610 DownloadDangerType DownloadItemImpl::GetDangerType() const { |
610 return danger_type_; | 611 return danger_type_; |
611 } | 612 } |
612 | 613 |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 case RESUME_MODE_USER_CONTINUE: | 1627 case RESUME_MODE_USER_CONTINUE: |
1627 return "USER_CONTINUE"; | 1628 return "USER_CONTINUE"; |
1628 case RESUME_MODE_USER_RESTART: | 1629 case RESUME_MODE_USER_RESTART: |
1629 return "USER_RESTART"; | 1630 return "USER_RESTART"; |
1630 } | 1631 } |
1631 NOTREACHED() << "Unknown resume mode " << mode; | 1632 NOTREACHED() << "Unknown resume mode " << mode; |
1632 return "unknown"; | 1633 return "unknown"; |
1633 } | 1634 } |
1634 | 1635 |
1635 } // namespace content | 1636 } // namespace content |
OLD | NEW |