| Index: chrome/browser/notifications/notification_platform_bridge_linux.cc
|
| diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.cc b/chrome/browser/notifications/notification_platform_bridge_linux.cc
|
| index 7905a4523ae3629e10bb63ebb010e041992b3e65..6be925321199f6839cd58cb386cc9007be7e2b79 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_linux.cc
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_linux.cc
|
| @@ -30,6 +30,7 @@
|
| #include "chrome/browser/notifications/notification_display_service_factory.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/shell_integration_linux.h"
|
| +#include "components/url_formatter/elide_url.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "dbus/bus.h"
|
| @@ -522,6 +523,22 @@ class NotificationPlatformBridgeLinuxImpl
|
| data->resource_files.push_back(std::move(image_file));
|
| }
|
| }
|
| +
|
| + // Attribute this notification to the origin, if any.
|
| + if (!notification->origin_url().is_empty()) {
|
| + if (!body.empty())
|
| + body += "\n";
|
| + std::string url_display_text =
|
| + base::UTF16ToUTF8(url_formatter::FormatUrlForSecurityDisplay(
|
| + notification->origin_url(),
|
| + url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS));
|
| + std::string spec = notification->origin_url().spec();
|
| + if (base::ContainsKey(capabilities_, "body-hyperlinks")) {
|
| + body += "<a href=\"" + spec + "\">" + url_display_text + "</a>";
|
| + } else {
|
| + body += url_display_text;
|
| + }
|
| + }
|
| }
|
| writer.AppendString(body);
|
|
|
|
|