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

Unified Diff: content/browser/notifications/notification_database.h

Issue 2223943002: Eagerly delete replaced notifications from the database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eagerly delete replaced notifications from the database 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
« no previous file with comments | « no previous file | content/browser/notifications/notification_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notifications/notification_database.h
diff --git a/content/browser/notifications/notification_database.h b/content/browser/notifications/notification_database.h
index 5cc9ea93a27d82e50039795a1f8f63293b875ab8..c08dbfeba7a32615603e92a5eecd301bb743446f 100644
--- a/content/browser/notifications/notification_database.h
+++ b/content/browser/notifications/notification_database.h
@@ -119,11 +119,13 @@ class CONTENT_EXPORT NotificationDatabase {
// failure if the to-be-deleted notification does not exist.
Status DeleteNotificationData(int64_t notification_id, const GURL& origin);
- // Deletes all data associated with |origin| from the database, and appends
- // the deleted notification ids to |deleted_notification_set|. Returns the
- // status code of the deletion operation.
+ // Deletes all data associated with |origin| from the database, optionally
+ // filtered by the |tag|, and appends the deleted notification ids to
+ // |deleted_notification_set|. Returns the status code of the deletion
+ // operation.
Status DeleteAllNotificationDataForOrigin(
const GURL& origin,
+ const std::string& tag,
std::set<int64_t>* deleted_notification_set);
// Deletes all data associated with the |service_worker_registration_id|
@@ -167,10 +169,11 @@ class CONTENT_EXPORT NotificationDatabase {
// Deletes all notification data with the given constraints. |origin| must
// always be set - use Destroy() when the goal is to empty the database. If
// |service_worker_registration_id| is invalid, all notification data for the
- // |origin| will be deleted.
+ // |origin| will be deleted, optionally filtered by the |tag| when non-empty.
// All deleted notification ids will be written to |deleted_notification_set|.
Status DeleteAllNotificationDataInternal(
const GURL& origin,
+ const std::string& tag,
int64_t service_worker_registration_id,
std::set<int64_t>* deleted_notification_set);
« no previous file with comments | « no previous file | content/browser/notifications/notification_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698