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

Issue 1019073002: The notification database should be able to read or delete multiple items. (Closed)

Created:
5 years, 9 months ago by Peter Beverloo
Modified:
5 years, 9 months ago
Reviewers:
johnme, cmumford
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The notification database should be able to read or delete multiple items. This adds five methods to the NotificationDatabase class to read or delete multiple notifications, which share two actual implementations. They will be used as follows: - Read all data: browsing data overviews. - Read all data for an origin: for origin storage overviews, quota client integration (storageQuota.queryInfo()). - Read all data for a SWR id: to get all notifications associated with a given SWR (SWR.getNotifications()). - Delete all data for an origin: clearing browsing data for a given origin. - Delete all data for a SWR id: to remove notifications when a service worker registration gets dropped. Actual integration with these features will be done in separate patches, this patch just introduces the primitives in the database. Design document: http://goo.gl/TciXVp BUG=447628 Committed: https://crrev.com/adb2fe2adbb7bb502cad486ef8b1a2d9f2122198 Cr-Commit-Position: refs/heads/master@{#321399}

Patch Set 1 #

Total comments: 20

Patch Set 2 : improve tests #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -39 lines) Patch
M content/browser/notifications/notification_database.h View 1 2 4 chunks +57 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_database.cc View 1 2 3 8 chunks +166 lines, -16 lines 0 comments Download
M content/browser/notifications/notification_database_unittest.cc View 1 7 chunks +182 lines, -23 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
Peter Beverloo
+cmumford for review +johnme for notifications I'll clean up and rework the tests for this.
5 years, 9 months ago (2015-03-18 20:28:57 UTC) #2
cmumford
https://codereview.chromium.org/1019073002/diff/1/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1019073002/diff/1/content/browser/notifications/notification_database.cc#newcode78 content/browser/notifications/notification_database.cc:78: return base::StringPrintf("%s%s", Can simplify to: return CreateDataPrefix(origin) + base::Int64ToString(notification_id); ...
5 years, 9 months ago (2015-03-18 22:41:21 UTC) #3
Peter Beverloo
Thank you! https://codereview.chromium.org/1019073002/diff/1/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1019073002/diff/1/content/browser/notifications/notification_database.cc#newcode78 content/browser/notifications/notification_database.cc:78: return base::StringPrintf("%s%s", On 2015/03/18 22:41:21, cmumford wrote: ...
5 years, 9 months ago (2015-03-19 14:35:52 UTC) #4
cmumford
lgtm
5 years, 9 months ago (2015-03-19 15:55:26 UTC) #5
johnme
lgtm with nit (and optional suggestion for alternative impl) https://codereview.chromium.org/1019073002/diff/40001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1019073002/diff/40001/content/browser/notifications/notification_database.cc#newcode46 content/browser/notifications/notification_database.cc:46: ...
5 years, 9 months ago (2015-03-19 16:17:10 UTC) #7
Peter Beverloo
https://codereview.chromium.org/1019073002/diff/40001/content/browser/notifications/notification_database.cc File content/browser/notifications/notification_database.cc (right): https://codereview.chromium.org/1019073002/diff/40001/content/browser/notifications/notification_database.cc#newcode46 content/browser/notifications/notification_database.cc:46: const int64_t kInvalidServiceWorkerRegistrationId = -1; On 2015/03/19 16:17:10, johnme ...
5 years, 9 months ago (2015-03-19 16:53:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1019073002/60001
5 years, 9 months ago (2015-03-19 16:54:02 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-19 18:49:35 UTC) #12
commit-bot: I haz the power
5 years, 9 months ago (2015-03-19 18:50:09 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/adb2fe2adbb7bb502cad486ef8b1a2d9f2122198
Cr-Commit-Position: refs/heads/master@{#321399}

Powered by Google App Engine
This is Rietveld 408576698