Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

Issue 1395093002: Fix system notifications incorrectly marked as type WEB_PAGE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timeout
Patch Set: Fix typo Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index f30b74b17ff6986643c3e45a9bd40c8686cc49ba..9ffb9331756e085b056fb9933dba8d8308cb37f4 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -36,6 +36,7 @@
#include "content/public/common/platform_notification_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/message_center/notification_types.h"
#include "ui/message_center/notifier_settings.h"
#include "ui/resources/grit/ui_resources.h"
#include "url/url_constants.h"
@@ -355,9 +356,11 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
// different pixel density. Be smarter about this when the API gets updated
// with a way for developers to specify images of different resolutions.
Notification notification(
- origin, notification_data.title, notification_data.body,
- gfx::Image::CreateFrom1xBitmap(icon), base::UTF8ToUTF16(origin.host()),
- notification_data.tag, delegate);
+ message_center::NOTIFICATION_TYPE_SIMPLE, notification_data.title,
+ notification_data.body, gfx::Image::CreateFrom1xBitmap(icon),
+ message_center::NotifierId(origin), base::UTF8ToUTF16(origin.host()),
+ origin, notification_data.tag, message_center::RichNotificationData(),
+ delegate);
notification.set_context_message(
DisplayNameForContextMessage(profile, origin));
@@ -387,8 +390,6 @@ Notification PlatformNotificationServiceImpl::CreateNotificationFromData(
notification.set_buttons(buttons);
- notification.set_is_web_notification(true);
-
// On desktop, notifications with require_interaction==true stay on-screen
// rather than minimizing to the notification center after a timeout.
// On mobile, this is ignored (notifications are minimized at all times).
« no previous file with comments | « chrome/browser/notifications/notification.cc ('k') | chrome/browser/status_icons/desktop_notification_balloon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698