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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 const std::string& DownloadItemImpl::GetHashState() const { | 579 const std::string& DownloadItemImpl::GetHashState() const { |
580 return hash_state_; | 580 return hash_state_; |
581 } | 581 } |
582 | 582 |
583 bool DownloadItemImpl::GetFileExternallyRemoved() const { | 583 bool DownloadItemImpl::GetFileExternallyRemoved() const { |
584 return file_externally_removed_; | 584 return file_externally_removed_; |
585 } | 585 } |
586 | 586 |
587 bool DownloadItemImpl::IsDangerous() const { | 587 bool DownloadItemImpl::IsDangerous() const { |
588 #ifdef OS_WIN | 588 #if defined(OS_WIN) |
589 // TODO(noelutz): At this point only the windows views UI supports | 589 // TODO(noelutz): At this point only the windows views UI supports |
590 // warnings based on dangerous content. | 590 // warnings based on dangerous content. |
591 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 591 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
592 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || | 592 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || |
593 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || | 593 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || |
594 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || | 594 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || |
595 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST); | 595 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST); |
596 #else | 596 #else |
597 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 597 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
598 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); | 598 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1675 case RESUME_MODE_USER_CONTINUE: | 1675 case RESUME_MODE_USER_CONTINUE: |
1676 return "USER_CONTINUE"; | 1676 return "USER_CONTINUE"; |
1677 case RESUME_MODE_USER_RESTART: | 1677 case RESUME_MODE_USER_RESTART: |
1678 return "USER_RESTART"; | 1678 return "USER_RESTART"; |
1679 } | 1679 } |
1680 NOTREACHED() << "Unknown resume mode " << mode; | 1680 NOTREACHED() << "Unknown resume mode " << mode; |
1681 return "unknown"; | 1681 return "unknown"; |
1682 } | 1682 } |
1683 | 1683 |
1684 } // namespace content | 1684 } // namespace content |
OLD | NEW |