diff options
Diffstat (limited to 'chrome/common/desktop_notifications/active_notification_tracker.cc')
-rw-r--r-- | chrome/common/desktop_notifications/active_notification_tracker.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/desktop_notifications/active_notification_tracker.cc b/chrome/common/desktop_notifications/active_notification_tracker.cc index d3d50cd..bcb6e2b 100644 --- a/chrome/common/desktop_notifications/active_notification_tracker.cc +++ b/chrome/common/desktop_notifications/active_notification_tracker.cc @@ -51,6 +51,14 @@ void ActiveNotificationTracker::UnregisterNotification(int id) { reverse_notification_table_.erase(*notification); } +void ActiveNotificationTracker::Clear() { + ReverseTable::iterator iter = reverse_notification_table_.begin(); + while (iter != reverse_notification_table_.end()) { + UnregisterNotification((*iter).second); + ++iter; + } +} + WebNotificationPermissionCallback* ActiveNotificationTracker::GetCallback( int id) { DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); |