Commit 1fbcaf20 authored by Joone Hur's avatar Joone Hur Committed by Commit Bot

Add ENABLE_NATIVE_NOTIFICATIONS guard for fixing link errors

When the build flag enable_native_notifications = false, link errors
happen. This CL adds ENABLE_NATIVE_NOTIFICATIONS guard to fix
this problem.

Bug: None
Change-Id: I5bc5a3770a7d15b2f2f9de32c92722ec4fad0946
Reviewed-on: https://chromium-review.googlesource.com/1014182Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Joone Hur <joone.hur@intel.com>
Cr-Commit-Position: refs/heads/master@{#551112}
parent 15e1d16d
...@@ -211,6 +211,7 @@ void NotificationDisplayServiceImpl::Display( ...@@ -211,6 +211,7 @@ void NotificationDisplayServiceImpl::Display(
return; return;
} }
#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
NotificationPlatformBridge* bridge = NotificationPlatformBridge* bridge =
NotificationPlatformBridge::CanHandleType(notification_type) NotificationPlatformBridge::CanHandleType(notification_type)
? bridge_ ? bridge_
...@@ -219,6 +220,7 @@ void NotificationDisplayServiceImpl::Display( ...@@ -219,6 +220,7 @@ void NotificationDisplayServiceImpl::Display(
bridge->Display(notification_type, profile_, notification, bridge->Display(notification_type, profile_, notification,
std::move(metadata)); std::move(metadata));
#endif
NotificationHandler* handler = GetNotificationHandler(notification_type); NotificationHandler* handler = GetNotificationHandler(notification_type);
if (handler) if (handler)
...@@ -235,6 +237,7 @@ void NotificationDisplayServiceImpl::Close( ...@@ -235,6 +237,7 @@ void NotificationDisplayServiceImpl::Close(
return; return;
} }
#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS)
NotificationPlatformBridge* bridge = NotificationPlatformBridge* bridge =
NotificationPlatformBridge::CanHandleType(notification_type) NotificationPlatformBridge::CanHandleType(notification_type)
? bridge_ ? bridge_
...@@ -242,6 +245,7 @@ void NotificationDisplayServiceImpl::Close( ...@@ -242,6 +245,7 @@ void NotificationDisplayServiceImpl::Close(
DCHECK(bridge); DCHECK(bridge);
bridge->Close(profile_, notification_id); bridge->Close(profile_, notification_id);
#endif
} }
void NotificationDisplayServiceImpl::GetDisplayed( void NotificationDisplayServiceImpl::GetDisplayed(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment