Commit 0c594289 authored by Min Qin's avatar Min Qin Committed by Commit Bot

Match download error notification message with that on download shelf

Currently we use something like "No permission" for notification text.
On download shelf, it is "Failed - No Permission", which is better as
user will know download actually failed.

BUG=888786

Change-Id: I0e7809d1a06db454cfe43c5df05da58595a02b31
Reviewed-on: https://chromium-review.googlesource.com/c/1259223Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596457}
parent 2f7072ff
......@@ -6,7 +6,9 @@
#include "base/android/jni_string.h"
#include "chrome/browser/download/offline_item_utils.h"
#include "chrome/grit/generated_resources.h"
#include "jni/DownloadUtils_jni.h"
#include "ui/base/l10n/l10n_util.h"
using base::android::ConvertUTF16ToJavaString;
using base::android::JavaParamRef;
......@@ -18,6 +20,7 @@ static ScopedJavaLocalRef<jstring> JNI_DownloadUtils_GetFailStateMessage(
jint fail_state) {
base::string16 message = OfflineItemUtils::GetFailStateMessage(
static_cast<offline_items_collection::FailState>(fail_state));
l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_INTERRUPTED, message);
return ConvertUTF16ToJavaString(env, message);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment