diff options
Diffstat (limited to 'chrome/common/desktop_notifications/active_notification_tracker.cc')
-rw-r--r-- | chrome/common/desktop_notifications/active_notification_tracker.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/common/desktop_notifications/active_notification_tracker.cc b/chrome/common/desktop_notifications/active_notification_tracker.cc index d3d50cd..3357ab3 100644 --- a/chrome/common/desktop_notifications/active_notification_tracker.cc +++ b/chrome/common/desktop_notifications/active_notification_tracker.cc @@ -13,7 +13,7 @@ using WebKit::WebNotificationPermissionCallback; bool ActiveNotificationTracker::GetId( const WebNotification& notification, int& id) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); ReverseTable::iterator iter = reverse_notification_table_.find(notification); if (iter == reverse_notification_table_.end()) return false; @@ -23,7 +23,7 @@ bool ActiveNotificationTracker::GetId( bool ActiveNotificationTracker::GetNotification( int id, WebNotification* notification) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); WebNotification* lookup = notification_table_.Lookup(id); if (!lookup) return false; @@ -34,7 +34,7 @@ bool ActiveNotificationTracker::GetNotification( int ActiveNotificationTracker::RegisterNotification( const WebKit::WebNotification& proxy) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); WebNotification* notification = new WebNotification(proxy); int id = notification_table_.Add(notification); reverse_notification_table_[proxy] = id; @@ -42,7 +42,7 @@ int ActiveNotificationTracker::RegisterNotification( } void ActiveNotificationTracker::UnregisterNotification(int id) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); // We want to free the notification after removing it from the table. scoped_ptr<WebNotification> notification(notification_table_.Lookup(id)); notification_table_.Remove(id); @@ -53,17 +53,17 @@ void ActiveNotificationTracker::UnregisterNotification(int id) { WebNotificationPermissionCallback* ActiveNotificationTracker::GetCallback( int id) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); return callback_table_.Lookup(id); } int ActiveNotificationTracker::RegisterPermissionRequest( WebNotificationPermissionCallback* callback) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); return callback_table_.Add(callback); } void ActiveNotificationTracker::OnPermissionRequestComplete(int id) { - DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_DEFAULT); + DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); callback_table_.Remove(id); } |