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/strings/string16.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "chrome/browser/download/download_crx_util.h" | 14 #include "chrome/browser/download/download_crx_util.h" |
15 #include "chrome/common/time_format.h" | 15 #include "chrome/common/time_format.h" |
16 #include "content/public/browser/download_danger_type.h" | 16 #include "content/public/browser/download_danger_type.h" |
17 #include "content/public/browser/download_interrupt_reasons.h" | 17 #include "content/public/browser/download_interrupt_reasons.h" |
18 #include "content/public/browser/download_item.h" | 18 #include "content/public/browser/download_item.h" |
19 #include "grit/chromium_strings.h" | 19 #include "grit/chromium_strings.h" |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 } | 509 } |
510 | 510 |
511 // In progress download with no known time left and non-zero completed bytes: | 511 // In progress download with no known time left and non-zero completed bytes: |
512 // "100/120 MB" or "100 MB" | 512 // "100/120 MB" or "100 MB" |
513 if (GetCompletedBytes() > 0) | 513 if (GetCompletedBytes() > 0) |
514 return size_ratio; | 514 return size_ratio; |
515 | 515 |
516 // Instead of displaying "0 B" we say "Starting..." | 516 // Instead of displaying "0 B" we say "Starting..." |
517 return l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING); | 517 return l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING); |
518 } | 518 } |
OLD | NEW |