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

Issue 441753002: Route newly created notifications to notification provider API. (Closed)

Created:
6 years, 4 months ago by liyanhou
Modified:
6 years, 4 months ago
CC:
chromium-reviews
Project:
chromium
Visibility:
Public.

Description

Route newly created notifications to notification provider API. Whenever a new notification is created, route it to an extension/app that has notification provider permission. Currently, if there's an app with notificationProvider permission, notifications will go to both message center and that app. In the future, when additional sections in Chrome Settings is implemented, this will send notifications to only one party based on the user's selection. BUG=397197 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289532

Patch Set 1 #

Patch Set 2 : bug fix #

Total comments: 28

Patch Set 3 : refactor code, add unit test and browser test #

Patch Set 4 : bug fix #

Patch Set 5 : rebase #

Patch Set 6 : bug fix #

Total comments: 18

Patch Set 7 : address comments #

Patch Set 8 : moved code of rerouting new notifications #

Patch Set 9 : rebase #

Total comments: 12

Patch Set 10 : rebase #

Patch Set 11 : address comments, refactor routing code, refactor image conversion code #

Patch Set 12 : changed AddToAlternateProvider #

Total comments: 20

Patch Set 13 : addressed comments, deleted browser tests for onUpdated and onCleared #

Unified diffs Side-by-side diffs Delta from patch set Stats (+529 lines, -163 lines) Patch
M chrome/browser/extensions/api/notification_provider/notification_provider_apitest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -43 lines 0 comments Download
M chrome/browser/extensions/api/notifications/notifications_api.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +37 lines, -91 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +68 lines, -13 lines 0 comments Download
A chrome/browser/notifications/notification_conversion_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_conversion_helper.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +211 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_conversion_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +126 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/notification_provider/events/icon.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
M chrome/test/data/extensions/api_test/notification_provider/events/manifest.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/notification_provider/events/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +19 lines, -13 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
liyanhou
Could you take a look at this? Thank you so much!
6 years, 4 months ago (2014-08-05 00:40:14 UTC) #1
dewittj
needs tests
6 years, 4 months ago (2014-08-05 17:38:09 UTC) #2
Pete Williamson
https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc#newcode59 chrome/browser/notifications/message_center_notification_manager.cc:59: bool GfxImageToNotificationBitmapArgs( Why return bool when this has no ...
6 years, 4 months ago (2014-08-05 22:03:53 UTC) #3
dewittj
https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc#newcode660 chrome/browser/notifications/message_center_notification_manager.cc:660: // notifications will go to both Chrome Notification Center ...
6 years, 4 months ago (2014-08-07 22:49:09 UTC) #4
liyanhou
Addressed comments. Refactored code, and added browser and unit tests. petewil@ dewittj@ Could you take ...
6 years, 4 months ago (2014-08-08 22:40:26 UTC) #5
dewittj
https://codereview.chromium.org/441753002/diff/110001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/110001/chrome/browser/notifications/message_center_notification_manager.cc#newcode140 chrome/browser/notifications/message_center_notification_manager.cc:140: } Do you want to modify the Update function ...
6 years, 4 months ago (2014-08-09 00:29:53 UTC) #6
Pete Williamson
https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc#newcode120 chrome/browser/notifications/message_center_notification_manager.cc:120: "title", new base::StringValue(notification.title())); On 2014/08/08 22:40:24, liyanhou wrote: > ...
6 years, 4 months ago (2014-08-09 00:38:19 UTC) #7
liyanhou
Addressed comments. Could you take another look? Thank you so much! https://codereview.chromium.org/441753002/diff/110001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): ...
6 years, 4 months ago (2014-08-11 17:21:10 UTC) #8
Pete Williamson
Loogs good, but my comment at line 120 of message_center_notification_manager has not yet been addressed.
6 years, 4 months ago (2014-08-11 17:42:40 UTC) #9
liyanhou
petewil@ Sorry that I forgot to reply to the comment in message_center_notification_manager file. https://codereview.chromium.org/441753002/diff/20001/chrome/browser/notifications/message_center_notification_manager.cc File ...
6 years, 4 months ago (2014-08-11 17:59:23 UTC) #10
Pete Williamson
lgtm
6 years, 4 months ago (2014-08-11 18:07:42 UTC) #11
dewittj
https://codereview.chromium.org/441753002/diff/210001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/210001/chrome/browser/notifications/message_center_notification_manager.cc#newcode502 chrome/browser/notifications/message_center_notification_manager.cc:502: notification, profile_notification->profile(), extension_id); This is still in AddProfileNotification, meaning ...
6 years, 4 months ago (2014-08-12 18:47:39 UTC) #12
dewittj
https://codereview.chromium.org/441753002/diff/210001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/210001/chrome/browser/notifications/message_center_notification_manager.cc#newcode502 chrome/browser/notifications/message_center_notification_manager.cc:502: notification, profile_notification->profile(), extension_id); On 2014/08/12 18:47:39, dewittj wrote: > ...
6 years, 4 months ago (2014-08-12 21:04:15 UTC) #13
liyanhou
dewittj@ Addressed comments. Could you take another look? Thank you so much! https://codereview.chromium.org/441753002/diff/210001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc ...
6 years, 4 months ago (2014-08-13 17:30:37 UTC) #14
dewittj
lgtm with nits https://codereview.chromium.org/441753002/diff/210001/chrome/test/data/extensions/api_test/notification_provider/events/test.js File chrome/test/data/extensions/api_test/notification_provider/events/test.js (right): https://codereview.chromium.org/441753002/diff/210001/chrome/test/data/extensions/api_test/notification_provider/events/test.js#newcode8 chrome/test/data/extensions/api_test/notification_provider/events/test.js:8: nit: no blank line https://codereview.chromium.org/441753002/diff/310001/chrome/browser/notifications/message_center_notification_manager.cc File ...
6 years, 4 months ago (2014-08-13 18:30:18 UTC) #15
liyanhou
https://codereview.chromium.org/441753002/diff/310001/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/441753002/diff/310001/chrome/browser/notifications/message_center_notification_manager.cc#newcode141 chrome/browser/notifications/message_center_notification_manager.cc:141: if (!extension_id.empty()) { On 2014/08/13 18:30:17, dewittj wrote: > ...
6 years, 4 months ago (2014-08-13 20:28:57 UTC) #16
liyanhou
The CQ bit was checked by liyanhou@chromium.org
6 years, 4 months ago (2014-08-13 22:18:06 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/liyanhou@chromium.org/441753002/330001
6 years, 4 months ago (2014-08-13 22:20:44 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-14 10:30:56 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-08-14 12:17:16 UTC) #20
Message was sent while issue was closed.
Committed patchset #13 (330001) as 289532

Powered by Google App Engine
This is Rietveld 408576698