| Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
|
| index 95e15539b20546aa8b97e1b408a2ed3439161748..1b843659fd4ee2fb96ec8e786f5a1cf952eed62c 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
|
| @@ -576,7 +576,7 @@ public class DownloadUtils {
|
| } else if (item.isIndeterminate()) {
|
| // Count up the bytes.
|
| long bytes = info.getBytesReceived();
|
| - return DownloadUtils.getStringForBytes(context, BYTES_DOWNLOADED_STRINGS, bytes);
|
| + return DownloadUtils.getStringForDownloadedBytes(context, bytes);
|
| } else {
|
| // Count down the time.
|
| long msRemaining = info.getTimeRemainingInMillis();
|
| @@ -612,6 +612,17 @@ public class DownloadUtils {
|
|
|
| /**
|
| * Format the number of bytes into KB, or MB, or GB and return the corresponding string
|
| + * resource. Uses default download-related set of strings.
|
| + * @param context Context to use.
|
| + * @param bytes Number of bytes.
|
| + * @return A formatted string to be displayed.
|
| + */
|
| + public static String getStringForDownloadedBytes(Context context, long bytes) {
|
| + return getStringForBytes(context, BYTES_DOWNLOADED_STRINGS, bytes);
|
| + }
|
| +
|
| + /**
|
| + * Format the number of bytes into KB, or MB, or GB and return the corresponding string
|
| * resource.
|
| * @param context Context to use.
|
| * @param stringSet The string resources for displaying bytes in KB, MB and GB.
|
|
|