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

Unified Diff: chrome/browser/notifications/message_center_display_service.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/message_center_display_service.cc
diff --git a/chrome/browser/notifications/message_center_display_service.cc b/chrome/browser/notifications/message_center_display_service.cc
index 4ff6195539679db6630ccdf322ab00255048b322..e4eacc424433644bf757e76f44504ef7a993cd7e 100644
--- a/chrome/browser/notifications/message_center_display_service.cc
+++ b/chrome/browser/notifications/message_center_display_service.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/browser_thread.h"
MessageCenterDisplayService::MessageCenterDisplayService(
Profile* profile,
@@ -41,3 +42,14 @@ bool MessageCenterDisplayService::GetDisplayed(
}
return true;
}
+
+void MessageCenterDisplayService::GetDisplayedAsync(
+ const NotificationCommon::NotificationResultCallback& callback) const {
+ std::unique_ptr<std::set<std::string>> displayedNotifications =
Robert Sesek 2017/02/24 22:38:05 nit: under_scores
Miguel Garcia 2017/03/22 22:00:06 Done.
+ base::MakeUnique<std::set<std::string>>();
+ GetDisplayed(displayedNotifications.get());
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO, FROM_HERE,
+ base::Bind(callback, base::Passed(&displayedNotifications),
+ true /* supports sync */));
+}

Powered by Google App Engine
This is Rietveld 408576698