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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 return; | 659 return; |
660 } | 660 } |
661 BrowserThread::PostTaskAndReplyWithResult( | 661 BrowserThread::PostTaskAndReplyWithResult( |
662 BrowserThread::FILE, FROM_HERE, | 662 BrowserThread::FILE, FROM_HERE, |
663 base::Bind(&DeleteDownloadedFile, current_path_), | 663 base::Bind(&DeleteDownloadedFile, current_path_), |
664 base::Bind(&DeleteDownloadedFileDone, | 664 base::Bind(&DeleteDownloadedFileDone, |
665 weak_ptr_factory_.GetWeakPtr(), callback)); | 665 weak_ptr_factory_.GetWeakPtr(), callback)); |
666 } | 666 } |
667 | 667 |
668 bool DownloadItemImpl::IsDangerous() const { | 668 bool DownloadItemImpl::IsDangerous() const { |
669 #if defined(OS_WIN) || defined(OS_MACOSX) | 669 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
670 // TODO(noelutz): At this point only the windows views and OSX UI supports | 670 // TODO(noelutz): At this point only the windows views and OSX UI supports |
671 // warnings based on dangerous content. | 671 // warnings based on dangerous content. |
672 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 672 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
673 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || | 673 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || |
674 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || | 674 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || |
675 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || | 675 danger_type_ == DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT || |
676 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST || | 676 danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST || |
677 danger_type_ == DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED); | 677 danger_type_ == DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED); |
678 #else | 678 #else |
679 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 679 return (danger_type_ == DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 case RESUME_MODE_USER_CONTINUE: | 1805 case RESUME_MODE_USER_CONTINUE: |
1806 return "USER_CONTINUE"; | 1806 return "USER_CONTINUE"; |
1807 case RESUME_MODE_USER_RESTART: | 1807 case RESUME_MODE_USER_RESTART: |
1808 return "USER_RESTART"; | 1808 return "USER_RESTART"; |
1809 } | 1809 } |
1810 NOTREACHED() << "Unknown resume mode " << mode; | 1810 NOTREACHED() << "Unknown resume mode " << mode; |
1811 return "unknown"; | 1811 return "unknown"; |
1812 } | 1812 } |
1813 | 1813 |
1814 } // namespace content | 1814 } // namespace content |
OLD | NEW |