Chromium Code Reviews| 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..6c04ae12d1219450796a84a562085799295e8058 100644 |
| --- a/chrome/browser/notifications/notification_display_service_factory.cc |
| +++ b/chrome/browser/notifications/notification_display_service_factory.cc |
| @@ -39,25 +39,23 @@ NotificationDisplayServiceFactory::NotificationDisplayServiceFactory() |
| // Selection of the implementation works as follows: |
| // - Android always uses the NativeNotificationDisplayService. |
| -// - Mac uses the MessageCenterDisplayService by default, but can use the |
| -// NativeNotificationDisplayService by using the chrome://flags or via |
| -// the --enable-features=NativeNotifications command line flag. |
| +// - Mac uses the NativeNotificationDisplayService by default but |
| +// can revert to MessageCenterDisplayService via |
| +// chrome://flags#enable-native-notifications or Finch |
| +// - Linux uses MessageCenterDisplayService by default but can switch |
| +// to NativeNotificationDisplayService via |
| +// chrome://flags#enable-native-notifications |
| // - All other platforms always use the MessageCenterDisplayService. |
| KeyedService* NotificationDisplayServiceFactory::BuildServiceInstanceFor( |
| content::BrowserContext* context) const { |
| #if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) |
| -#if defined(OS_ANDROID) |
| - return new NativeNotificationDisplayService( |
| - Profile::FromBrowserContext(context), |
| - g_browser_process->notification_platform_bridge()); |
| -#else // defined(OS_ANDROID) |
| + // Note that for android this flag must always be true. |
|
Peter Beverloo
2017/04/25 16:31:29
DCHECK?
Miguel Garcia
2017/05/03 07:11:33
As discussed offline in addition to the DCHECK I a
|
| if (base::FeatureList::IsEnabled(features::kNativeNotifications) && |
| g_browser_process->notification_platform_bridge()) { |
| return new NativeNotificationDisplayService( |
| Profile::FromBrowserContext(context), |
| g_browser_process->notification_platform_bridge()); |
| } |
| -#endif // defined(OS_ANDROID) |
| #endif // BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) |
| return new MessageCenterDisplayService( |
| Profile::FromBrowserContext(context), |