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

Unified Diff: chrome/renderer/notification_provider.cc

Issue 363003: Implement cancel() API on a Notification object so that script can cancel or ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/views/notifications/balloon_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/notification_provider.cc
===================================================================
--- chrome/renderer/notification_provider.cc (revision 30967)
+++ chrome/renderer/notification_provider.cc (working copy)
@@ -31,7 +31,7 @@
void NotificationProvider::cancel(const WebNotification& notification) {
int id;
bool id_found = manager_.GetId(notification, id);
- DCHECK(id_found);
+ // Won't be found if the notification has already been closed by the user.
if (id_found)
Send(new ViewHostMsg_CancelDesktopNotification(view_->routing_id(), id));
}
@@ -40,7 +40,7 @@
const WebNotification& notification) {
int id;
bool id_found = manager_.GetId(notification, id);
- DCHECK(id_found);
+ // Won't be found if the notification has already been closed by the user.
if (id_found)
manager_.UnregisterNotification(id);
}
« no previous file with comments | « chrome/browser/views/notifications/balloon_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698