| Index: content/browser/notifications/notification_database.cc
|
| diff --git a/content/browser/notifications/notification_database.cc b/content/browser/notifications/notification_database.cc
|
| index 25350b952222dfef5cd58b34179bf6aa1bc2759d..f97ef4cf10ef04c20c9db29f4b565f097323fc12 100644
|
| --- a/content/browser/notifications/notification_database.cc
|
| +++ b/content/browser/notifications/notification_database.cc
|
| @@ -189,16 +189,19 @@ NotificationDatabase::Status NotificationDatabase::WriteNotificationData(
|
| DCHECK(notification_id);
|
| DCHECK(origin.is_valid());
|
|
|
| + DCHECK_GE(next_notification_id_, kFirstNotificationId);
|
| +
|
| + NotificationDatabaseData storage_data = notification_database_data;
|
| + storage_data.notification_id = next_notification_id_;
|
| +
|
| std::string serialized_data;
|
| - if (!SerializeNotificationDatabaseData(notification_database_data,
|
| + if (!SerializeNotificationDatabaseData(storage_data,
|
| &serialized_data)) {
|
| DLOG(ERROR) << "Unable to serialize data for a notification belonging "
|
| << "to: " << origin;
|
| return STATUS_ERROR_FAILED;
|
| }
|
|
|
| - DCHECK_GE(next_notification_id_, kFirstNotificationId);
|
| -
|
| leveldb::WriteBatch batch;
|
| batch.Put(CreateDataKey(origin, next_notification_id_), serialized_data);
|
| batch.Put(kNextNotificationIdKey,
|
|
|