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

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

Issue 2709213005: [Mac] Add XPC alerts to GetDisplayedNotifications (Closed)
Patch Set: - Created 3 years, 10 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/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 10c6a5466efe2ad66c68a8a7717c5f45d6d221e2..d7a5ac0acd79c827850a2ae42e0bafcf9d23f53a 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -389,6 +389,18 @@ bool PlatformNotificationServiceImpl::GetDisplayedNotifications(
displayed_notifications);
}
+void PlatformNotificationServiceImpl::GetDisplayedNotificationsAsync(
+ BrowserContext* browser_context,
+ const NotificationCommon::NotificationResultCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ if (!profile || profile->AsTestingProfile())
+ return; // Tests will not have a message center.
+
+ GetNotificationDisplayService(profile)->GetDisplayedAsync(callback);
+}
+
void PlatformNotificationServiceImpl::OnClickEventDispatchComplete(
content::PersistentNotificationStatus status) {
UMA_HISTOGRAM_ENUMERATION(

Powered by Google App Engine
This is Rietveld 408576698