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

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: 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/peripheral_battery_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d93ec84309d9e76b6696253051959a74b8943011 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;
@@ -69,6 +71,7 @@ using extensions::UnloadedExtensionInfo;
namespace {
const char kNotificationPrefix[] = "app.background.crashed.";
+const char kNotifierId[] = "app.background.crashed";
bool g_disable_close_balloon_for_testing = false;
void CloseBalloon(const std::string& balloon_id, ProfileID profile_id) {
@@ -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);
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/peripheral_battery_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698