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

Unified Diff: chrome/browser/background/background_contents_service.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: Addressed Peter's review comments 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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index d437f321d9daaf234c81ccb065ff1a4224778d5e..5b77ce2632322c786f32a38ef7d80c57b3195714 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -58,6 +58,8 @@
#if defined(ENABLE_NOTIFICATIONS)
#include "ui/message_center/message_center.h"
+#include "ui/message_center/notification_types.h"
+#include "ui/message_center/notifier_settings.h"
#endif
using content::SiteInstance;
@@ -68,6 +70,7 @@ using extensions::UnloadedExtensionInfo;
namespace {
+const char kNotifierId[] = "app.background.crashed";
Peter Beverloo 2015/10/09 12:55:23 micro nit: alphabetise (you do it elsewhere).
johnme 2015/10/09 14:20:41 Done.
const char kNotificationPrefix[] = "app.background.crashed.";
bool g_disable_close_balloon_for_testing = false;
@@ -170,12 +173,17 @@ void NotificationImageReady(
// Origin URL must be different from the crashed extension to avoid the
// conflict. NotificationSystemObserver will cancel all notifications from
// the same origin when NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED.
- Notification notification(GURL("chrome://extension-crash"),
+ Notification notification(message_center::NOTIFICATION_TYPE_SIMPLE,
base::string16(),
message,
notification_icon,
+ message_center::NotifierId(
+ message_center::NotifierId::SYSTEM_COMPONENT,
+ kNotifierId),
base::string16(),
+ GURL("chrome://extension-crash"),
delegate->id(),
+ message_center::RichNotificationData(),
delegate.get());
g_browser_process->notification_ui_manager()->Add(notification, profile);

Powered by Google App Engine
This is Rietveld 408576698