| Index: content/browser/notifications/notification_database.h
|
| diff --git a/content/browser/notifications/notification_database.h b/content/browser/notifications/notification_database.h
|
| index c08dbfeba7a32615603e92a5eecd301bb743446f..0de91faf5c7560c041f8a734b472488fb601a131 100644
|
| --- a/content/browser/notifications/notification_database.h
|
| +++ b/content/browser/notifications/notification_database.h
|
| @@ -79,10 +79,10 @@ class CONTENT_EXPORT NotificationDatabase {
|
| Status Open(bool create_if_missing);
|
|
|
| // Reads the notification data for the notification identified by
|
| - // |notification_id| and belonging to |origin| from the database, and stores
|
| - // it in |notification_database_data|. Returns the status code.
|
| + // |persistent_notification_id| and belonging to |origin| from the database,
|
| + // and stores it in |notification_database_data|. Returns the status code.
|
| Status ReadNotificationData(
|
| - int64_t notification_id,
|
| + int64_t persistent_notification_id,
|
| const GURL& origin,
|
| NotificationDatabaseData* notification_database_data) const;
|
|
|
| @@ -107,17 +107,19 @@ class CONTENT_EXPORT NotificationDatabase {
|
|
|
| // Writes the |notification_database_data| for a new notification belonging to
|
| // |origin| to the database, and returns the status code of the writing
|
| - // operation. The id of the new notification will be set in |notification_id|.
|
| + // operation. The id of the new notification will be written to
|
| + // |persistent_notification_id|.
|
| Status WriteNotificationData(
|
| const GURL& origin,
|
| const NotificationDatabaseData& notification_database_data,
|
| - int64_t* notification_id);
|
| + int64_t* persistent_notification_id);
|
|
|
| // Deletes all data associated with the notification identified by
|
| - // |notification_id| belonging to |origin| from the database. Returns the
|
| - // status code of the deletion operation. Note that it is not considered a
|
| - // failure if the to-be-deleted notification does not exist.
|
| - Status DeleteNotificationData(int64_t notification_id, const GURL& origin);
|
| + // |persistent_notification_id| belonging to |origin| from the database.
|
| + // Returns the status code of the deletion operation. Note that it is not
|
| + // considered a failure if the to-be-deleted notification does not exist.
|
| + Status DeleteNotificationData(int64_t persistent_notification_id,
|
| + const GURL& origin);
|
|
|
| // Deletes all data associated with |origin| from the database, optionally
|
| // filtered by the |tag|, and appends the deleted notification ids to
|
| @@ -137,6 +139,19 @@ class CONTENT_EXPORT NotificationDatabase {
|
| int64_t service_worker_registration_id,
|
| std::set<int64_t>* deleted_notification_set);
|
|
|
| + // Stores an association of |notification_id| to |persistent_notification_id|
|
| + // to the database. Returns the status code of the operation.
|
| + Status StoreIdAssociation(const std::string& notification_id,
|
| + int64_t persistent_notification_id);
|
| +
|
| + // Reads the |*persistent_notification_id| that is associated with the
|
| + // |notification_id|. Returns the status code of the operation.
|
| + Status ReadIdAssociation(const std::string& notification_id,
|
| + int64_t* persistent_notification_id);
|
| +
|
| + // Removes the association stored for the given |notification_id|.
|
| + Status DeleteIdAssociation(const std::string& notification_id);
|
| +
|
| // Completely destroys the contents of this database.
|
| Status Destroy();
|
|
|
|
|