[Automatic Downloads] Update Android warning text.
This change updates the text of the warning that shows up on Android
when multiple downloads are attempted without user interaction.
This is to shorten the message, align it with other similar warning
messages on Android, and also align it with the warning text on Desktop.
Bug: 906628
Change-Id: Ie7e46ee8fa0251268b8db63322becf24b07207a0
Reviewed-on: https://chromium-review.googlesource.com/c/1341842
Reviewed-by: Peter Beverloo <[email protected]>
Reviewed-by: David Trainor <[email protected]>
Commit-Queue: Mugdha Lakhani <[email protected]>
Cr-Commit-Position: refs/heads/master@{#610570}
diff --git a/chrome/browser/download/download_permission_request.cc b/chrome/browser/download/download_permission_request.cc
index 93970ec..f4ebc6de 100644
--- a/chrome/browser/download/download_permission_request.cc
+++ b/chrome/browser/download/download_permission_request.cc
@@ -10,6 +10,8 @@
#if defined(OS_ANDROID)
#include "chrome/browser/android/android_theme_resources.h"
+#include "components/url_formatter/elide_url.h"
+#include "url/origin.h"
#else
#include "chrome/app/vector_icons/vector_icons.h"
#endif
@@ -34,7 +36,12 @@
#if defined(OS_ANDROID)
base::string16 DownloadPermissionRequest::GetMessageText() const {
- return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING);
+ return l10n_util::GetStringFUTF16(
+ IDS_MULTI_DOWNLOAD_WARNING,
+ url_formatter::FormatOriginForSecurityDisplay(
+ url::Origin::Create(request_origin_),
+ /*scheme_display = */ url_formatter::
+ SchemeDisplay::OMIT_CRYPTOGRAPHIC));
}
#endif