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

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

Issue 2848403002: Linux native notifications: Implement GetDisplayedNotifications (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_platform_bridge_linux.cc
diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.cc b/chrome/browser/notifications/notification_platform_bridge_linux.cc
index cf71db8869d0a8a1c7c5f89085a7fd8338243d6c..38869b87da57e1c17c64e0c89586fa7c2b388512 100644
--- a/chrome/browser/notifications/notification_platform_bridge_linux.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_linux.cc
@@ -454,10 +454,14 @@ class NotificationPlatformBridgeLinuxImpl
bool incognito,
const GetDisplayedNotificationsCallback& callback) const {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- // TODO(thomasanderson): Implement.
- PostTaskToUiThread(base::BindOnce(
- callback, base::Passed(base::MakeUnique<std::set<std::string>>()),
- false));
+ auto displayed = base::MakeUnique<std::set<std::string>>();
+ for (const auto& notification : notifications_) {
+ if (notification.first->profile_id == profile_id &&
+ notification.first->is_incognito == incognito) {
+ displayed->insert(notification.first->notification_id);
+ }
+ }
Peter Beverloo 2017/05/02 13:53:42 Are we confident that we can rely on the Notificat
Tom (Use chromium acct) 2017/05/02 20:59:16 yes I believe so
+ PostTaskToUiThread(base::BindOnce(callback, std::move(displayed), true));
}
NotificationData* FindNotificationData(const std::string& notification_id,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698