OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/download/download_item_model.h" | 5 #include "chrome/browser/download/download_item_model.h" |
6 | 6 |
7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING) : | 70 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING) : |
71 FormatBytes(size, GetByteDisplayUnits(size), true); | 71 FormatBytes(size, GetByteDisplayUnits(size), true); |
72 } else { | 72 } else { |
73 status_text = l10n_util::GetStringFUTF16( | 73 status_text = l10n_util::GetStringFUTF16( |
74 IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, simple_total, | 74 IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, simple_total, |
75 simple_time); | 75 simple_time); |
76 } | 76 } |
77 } | 77 } |
78 break; | 78 break; |
79 case DownloadItem::COMPLETE: | 79 case DownloadItem::COMPLETE: |
80 status_text.clear(); | 80 if (download_->file_externally_removed()) { |
| 81 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_REMOVED); |
| 82 } else { |
| 83 status_text.clear(); |
| 84 } |
81 break; | 85 break; |
82 case DownloadItem::CANCELLED: | 86 case DownloadItem::CANCELLED: |
83 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_CANCELED); | 87 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_CANCELED); |
84 break; | 88 break; |
85 case DownloadItem::REMOVING: | 89 case DownloadItem::REMOVING: |
86 break; | 90 break; |
87 case DownloadItem::INTERRUPTED: | 91 case DownloadItem::INTERRUPTED: |
88 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_INTERRUPTED, | 92 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_INTERRUPTED, |
89 simple_size, | 93 simple_size, |
90 simple_total); | 94 simple_total); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 IDS_SAVE_PAGE_STATUS_INTERRUPTED, | 137 IDS_SAVE_PAGE_STATUS_INTERRUPTED, |
134 base::FormatNumber(size), | 138 base::FormatNumber(size), |
135 base::FormatNumber(total_size)); | 139 base::FormatNumber(total_size)); |
136 break; | 140 break; |
137 default: | 141 default: |
138 NOTREACHED(); | 142 NOTREACHED(); |
139 } | 143 } |
140 | 144 |
141 return status_text; | 145 return status_text; |
142 } | 146 } |
OLD | NEW |