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

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

Issue 2828503005: Add NotificationDisplayServiceProxy (Closed)
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/notifications/notification_display_service_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_display_service_factory.cc
diff --git a/chrome/browser/notifications/notification_display_service_factory.cc b/chrome/browser/notifications/notification_display_service_factory.cc
index 3e7c4f17533e5000c53c894bbd2a78fa6578b7cd..2bc9b96f662513e8576523e8513e5a8dceb9be7b 100644
--- a/chrome/browser/notifications/notification_display_service_factory.cc
+++ b/chrome/browser/notifications/notification_display_service_factory.cc
@@ -8,6 +8,7 @@
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/message_center_display_service.h"
+#include "chrome/browser/notifications/notification_display_service_proxy.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
@@ -50,14 +51,18 @@ KeyedService* NotificationDisplayServiceFactory::BuildServiceInstanceFor(
return new NativeNotificationDisplayService(
Profile::FromBrowserContext(context),
g_browser_process->notification_platform_bridge());
-#else // defined(OS_ANDROID)
- if (base::FeatureList::IsEnabled(features::kNativeNotifications) &&
- g_browser_process->notification_platform_bridge()) {
+#elif defined(OS_MACOSX)
+ if (base::FeatureList::IsEnabled(features::kNativeNotifications)) {
return new NativeNotificationDisplayService(
Profile::FromBrowserContext(context),
g_browser_process->notification_platform_bridge());
}
-#endif // defined(OS_ANDROID)
+#elif defined(OS_LINUX)
+ if (base::FeatureList::IsEnabled(features::kNativeNotifications)) {
+ return new NotificationDisplayServiceProxy(
+ Profile::FromBrowserContext(context));
+ }
+#endif
#endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
return new MessageCenterDisplayService(
Profile::FromBrowserContext(context),
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/notifications/notification_display_service_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698