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

Issue 1004493002: Store the next notification id in the notification database. (Closed)

Created:
5 years, 9 months ago by Peter Beverloo
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, Michael van Ouwerkerk, dewittj
Base URL:
https://chromium.googlesource.com/chromium/src.git@n-db-NotificationDatabase
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Store the next notification id in the notification database. Persistent notifications will get ever incrementing (well, int64) ids assigned to them when they're being written to the database. This CL implements this behavior as GetNextNotificationId(). Note that this patch contains some temporary code intended for testing its functionality, which will be removed when we start writing actual notification data to the database. Design document: http://goo.gl/TciXVp BUG=447628 Committed: https://crrev.com/05e061be8d5e07efc42962f9b6d2aa60d61b5daf Cr-Commit-Position: refs/heads/master@{#320491}

Patch Set 1 #

Patch Set 2 : #

Total comments: 16

Patch Set 3 : Bernhard's feedback #

Total comments: 7

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -0 lines) Patch
M content/browser/notifications/notification_database.h View 1 2 3 4 chunks +15 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_database.cc View 1 2 3 4 3 chunks +54 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_database_unittest.cc View 1 2 3 3 chunks +90 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
Peter Beverloo
Notably, NotificationDatabaseTest::IncrementNextNotificationId will be removed when we start storing notification data. Having some temporary code ...
5 years, 9 months ago (2015-03-11 21:21:44 UTC) #2
Bernhard Bauer
https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc#newcode21 content/browser/notifications/notification_database.cc:21: // value: <int64 'next_notification_id'> Is "int64" correct here if ...
5 years, 9 months ago (2015-03-11 22:02:38 UTC) #3
Peter Beverloo
https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc#newcode21 content/browser/notifications/notification_database.cc:21: // value: <int64 'next_notification_id'> On 2015/03/11 22:02:38, Bernhard Bauer ...
5 years, 9 months ago (2015-03-11 22:33:33 UTC) #4
cmumford
https://codereview.chromium.org/1004493002/diff/40001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/40001/content/browser/notifications/notification_database.cc#newcode92 content/browser/notifications/notification_database.cc:92: NotificationDatabase::Status NotificationDatabase::GetNextNotificationId( This doesn't modify the class so could ...
5 years, 9 months ago (2015-03-12 02:09:37 UTC) #5
Peter Beverloo
Thank you for the review! :-) https://codereview.chromium.org/1004493002/diff/40001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/40001/content/browser/notifications/notification_database.cc#newcode92 content/browser/notifications/notification_database.cc:92: NotificationDatabase::Status NotificationDatabase::GetNextNotificationId( On ...
5 years, 9 months ago (2015-03-12 02:13:56 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/20001/content/browser/notifications/notification_database.cc#newcode21 content/browser/notifications/notification_database.cc:21: // value: <int64 'next_notification_id'> On 2015/03/11 22:33:33, Peter Beverloo ...
5 years, 9 months ago (2015-03-12 09:29:33 UTC) #7
Peter Beverloo
All applied. Ideally I would like NotificationDatabase::WriteNextNotificationId to verify in debug that the written id ...
5 years, 9 months ago (2015-03-12 14:29:00 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/1004493002/diff/60001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/60001/content/browser/notifications/notification_database.cc#newcode111 content/browser/notifications/notification_database.cc:111: next_notification_id <= 0) { `next_notification_id < kFirstNotificationId`? https://codereview.chromium.org/1004493002/diff/60001/content/browser/notifications/notification_database.cc#newcode140 content/browser/notifications/notification_database.cc:140: ...
5 years, 9 months ago (2015-03-12 16:38:55 UTC) #9
Peter Beverloo
https://codereview.chromium.org/1004493002/diff/60001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1004493002/diff/60001/content/browser/notifications/notification_database.cc#newcode111 content/browser/notifications/notification_database.cc:111: next_notification_id <= 0) { On 2015/03/12 16:38:55, Bernhard Bauer ...
5 years, 9 months ago (2015-03-12 17:05:52 UTC) #10
Bernhard Bauer
lgtm
5 years, 9 months ago (2015-03-13 12:19:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004493002/80001
5 years, 9 months ago (2015-03-13 13:12:41 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-13 13:16:12 UTC) #14
commit-bot: I haz the power
5 years, 9 months ago (2015-03-13 13:16:57 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/05e061be8d5e07efc42962f9b6d2aa60d61b5daf
Cr-Commit-Position: refs/heads/master@{#320491}

Powered by Google App Engine
This is Rietveld 408576698