OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING) : | 75 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING) : |
76 FormatBytes(size, GetByteDisplayUnits(size), true); | 76 FormatBytes(size, GetByteDisplayUnits(size), true); |
77 } else { | 77 } else { |
78 status_text = l10n_util::GetStringFUTF16( | 78 status_text = l10n_util::GetStringFUTF16( |
79 IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, simple_total, | 79 IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, simple_total, |
80 simple_time); | 80 simple_time); |
81 } | 81 } |
82 } | 82 } |
83 break; | 83 break; |
84 case DownloadItem::COMPLETE: | 84 case DownloadItem::COMPLETE: |
85 status_text.clear(); | 85 if (download_->file_externally_removed()) { |
| 86 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_REMOVED); |
| 87 } else { |
| 88 status_text.clear(); |
| 89 } |
86 break; | 90 break; |
87 case DownloadItem::CANCELLED: | 91 case DownloadItem::CANCELLED: |
88 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_CANCELED); | 92 status_text = l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_CANCELED); |
89 break; | 93 break; |
90 case DownloadItem::REMOVING: | 94 case DownloadItem::REMOVING: |
91 break; | 95 break; |
92 case DownloadItem::INTERRUPTED: | 96 case DownloadItem::INTERRUPTED: |
93 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_INTERRUPTED, | 97 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_INTERRUPTED, |
94 simple_size, | 98 simple_size, |
95 simple_total); | 99 simple_total); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 IDS_SAVE_PAGE_STATUS_INTERRUPTED, | 142 IDS_SAVE_PAGE_STATUS_INTERRUPTED, |
139 base::FormatNumber(size), | 143 base::FormatNumber(size), |
140 base::FormatNumber(total_size)); | 144 base::FormatNumber(total_size)); |
141 break; | 145 break; |
142 default: | 146 default: |
143 NOTREACHED(); | 147 NOTREACHED(); |
144 } | 148 } |
145 | 149 |
146 return status_text; | 150 return status_text; |
147 } | 151 } |
OLD | NEW |