| 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 #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/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 return l10n_util::GetStringUTF16(string_id); | 308 return l10n_util::GetStringUTF16(string_id); |
| 309 } | 309 } |
| 310 | 310 |
| 311 // static | 311 // static |
| 312 string16 BaseDownloadItemModel::InterruptReasonMessage(int reason) { | 312 string16 BaseDownloadItemModel::InterruptReasonMessage(int reason) { |
| 313 int string_id = 0; | 313 int string_id = 0; |
| 314 string16 status_text; | 314 string16 status_text; |
| 315 | 315 |
| 316 switch (reason) { | 316 switch (reason) { |
| 317 case content::DOWNLOAD_INTERRUPT_REASON_NONE: | 317 case content::DOWNLOAD_INTERRUPT_REASON_NONE: |
| 318 string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS; |
| 318 break; | 319 break; |
| 319 case content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED: | 320 case content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED: |
| 320 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_ACCESS_DENIED; | 321 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_ACCESS_DENIED; |
| 321 break; | 322 break; |
| 322 case content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE: | 323 case content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE: |
| 323 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_DISK_FULL; | 324 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_DISK_FULL; |
| 324 break; | 325 break; |
| 325 case content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG: | 326 case content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG: |
| 326 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_PATH_TOO_LONG; | 327 string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_PATH_TOO_LONG; |
| 327 break; | 328 break; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 break; | 362 break; |
| 362 default: | 363 default: |
| 363 string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS; | 364 string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS; |
| 364 break; | 365 break; |
| 365 } | 366 } |
| 366 | 367 |
| 367 status_text = l10n_util::GetStringUTF16(string_id); | 368 status_text = l10n_util::GetStringUTF16(string_id); |
| 368 | 369 |
| 369 return status_text; | 370 return status_text; |
| 370 } | 371 } |
| OLD | NEW |