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

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

Issue 2534443002: Use notification display service to collect persistent notifications. (Closed)
Patch Set: fix infinite loop Created 4 years 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 2f79b35ba28726a7a4df6c89f2a6657713a91913..25bcadda2b810d5519e694e293e97e3dee28e966 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -361,16 +361,16 @@ void PlatformNotificationServiceImpl::ClosePersistentNotification(
notification_id);
}
-bool PlatformNotificationServiceImpl::GetDisplayedPersistentNotifications(
+bool PlatformNotificationServiceImpl::GetDisplayedNotifications(
BrowserContext* browser_context,
std::set<std::string>* displayed_notifications) {
DCHECK(displayed_notifications);
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromBrowserContext(browser_context);
if (!profile || profile->AsTestingProfile())
return false; // Tests will not have a message center.
- // TODO(peter): Filter for persistent notifications only.
return GetNotificationDisplayService(profile)->GetDisplayed(
displayed_notifications);
}

Powered by Google App Engine
This is Rietveld 408576698