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

Unified Diff: ui/message_center/message_center_impl_unittest.cc

Issue 2198363002: Pass Notification into NotificationBlocker ShouldShow* methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ash build errors Created 4 years, 4 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: ui/message_center/message_center_impl_unittest.cc
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index 9afe1bd119035a1e84872513b356cae5c365adfc..49b03d35b760916ca63d616e3b6e89c83863bb09 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -154,7 +154,7 @@ class ToggledNotificationBlocker : public NotificationBlocker {
// NotificationBlocker overrides:
bool ShouldShowNotificationAsPopup(
- const message_center::NotifierId& notifier_id) const override {
+ const message_center::Notification& notification) const override {
return notifications_enabled_;
}
@@ -174,9 +174,10 @@ class PopupNotificationBlocker : public ToggledNotificationBlocker {
// NotificationBlocker overrides:
bool ShouldShowNotificationAsPopup(
- const NotifierId& notifier_id) const override {
- return (notifier_id == allowed_notifier_) ||
- ToggledNotificationBlocker::ShouldShowNotificationAsPopup(notifier_id);
+ const Notification& notification) const override {
+ return (notification.notifier_id() == allowed_notifier_) ||
+ ToggledNotificationBlocker::ShouldShowNotificationAsPopup(
+ notification);
}
private:
@@ -193,8 +194,8 @@ class TotalNotificationBlocker : public PopupNotificationBlocker {
~TotalNotificationBlocker() override {}
// NotificationBlocker overrides:
- bool ShouldShowNotification(const NotifierId& notifier_id) const override {
- return ShouldShowNotificationAsPopup(notifier_id);
+ bool ShouldShowNotification(const Notification& notification) const override {
+ return ShouldShowNotificationAsPopup(notification);
}
private:

Powered by Google App Engine
This is Rietveld 408576698