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

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

Issue 2703213004: Migrate extension notifications to the new NotificationDisplayService (Closed)
Patch Set: Migrate extension notifications to the new NotificationDisplayService Created 3 years, 8 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/native_notification_display_service.cc
diff --git a/chrome/browser/notifications/native_notification_display_service.cc b/chrome/browser/notifications/native_notification_display_service.cc
index 169f175e63e107d74a8bbbab0c7810a57b4dde50..b9aa26d6248f6b2497974a3ead18fddfe5b5481e 100644
--- a/chrome/browser/notifications/native_notification_display_service.cc
+++ b/chrome/browser/notifications/native_notification_display_service.cc
@@ -15,6 +15,11 @@
#include "chrome/browser/notifications/persistent_notification_handler.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/features/features.h"
+
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+#include "chrome/browser/extensions/api/notifications/extension_notification_handler.h"
+#endif
namespace {
@@ -41,6 +46,10 @@ NativeNotificationDisplayService::NativeNotificationDisplayService(
base::MakeUnique<NonPersistentNotificationHandler>());
AddNotificationHandler(NotificationCommon::PERSISTENT,
base::MakeUnique<PersistentNotificationHandler>());
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ AddNotificationHandler(NotificationCommon::EXTENSION,
+ base::MakeUnique<ExtensionNotificationHandler>());
+#endif
}
NativeNotificationDisplayService::~NativeNotificationDisplayService() {}

Powered by Google App Engine
This is Rietveld 408576698