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

Issue 1395093002: Fix system notifications incorrectly marked as type WEB_PAGE (Closed)

Created:
5 years, 2 months ago by johnme
Modified:
5 years, 2 months ago
CC:
asanka, benjhayden+dwatch_chromium.org, chromium-reviews, davemoore+watch_chromium.org, derat+watch_chromium.org, mlamouri+watch-notifications_chromium.org, oshima+watch_chromium.org, peter+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@timeout
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix system notifications incorrectly marked as type WEB_PAGE Some system components were incorrectly calling the Notification constructor that was intended only for Web Notifications (though this wasn't clearly documented). I've fixed the incorrect calls, and removed the confusing constructor to prevent this reoccuring. Other system components were explicitly constructing a NotifierId using the constructor that takes a single GURL. I've fixed these incorrect calls. Finally, now that Web Notifications can be reliably detected using `notification->notifier_id().type == NotifierId::WEB_PAGE` I've removed the obsolete is_web_notification flag from message_center::Notification. BUG=542232 Committed: https://crrev.com/81256f554f024571955f7f82b7fe4c7064afd238 Cr-Commit-Position: refs/heads/master@{#353529}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Addressed Peter's review comments #

Total comments: 8

Patch Set 3 : Address peter's review nits #

Total comments: 2

Patch Set 4 : Link to bug instead of codereview #

Patch Set 5 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -60 lines) Patch
M chrome/browser/background/background_contents_service.cc View 1 2 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/chromeos/power/peripheral_battery_observer.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/local_discovery/privet_notifications.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/message_center_notifications_browsertest.cc View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/notifications/message_center_notifications_unittest.cc View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification.h View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/notifications/notification.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/status_icons/desktop_notification_balloon.cc View 1 2 3 4 3 chunks +13 lines, -2 lines 0 comments Download
M ui/message_center/message_center_style.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/message_center/message_center_style.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M ui/message_center/notification.h View 3 chunks +1 line, -10 lines 0 comments Download
M ui/message_center/notification.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M ui/message_center/popup_timer.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (7 generated)
johnme
5 years, 2 months ago (2015-10-09 10:24:06 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1395093002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1395093002/1
5 years, 2 months ago (2015-10-09 10:26:12 UTC) #4
Peter Beverloo
Thanks! This looks great, let me confirm one of my comments before I sign off. ...
5 years, 2 months ago (2015-10-09 10:47:30 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-09 11:08:42 UTC) #7
johnme
Addressed Peter's review comments - thanks :) https://codereview.chromium.org/1395093002/diff/1/chrome/browser/status_icons/desktop_notification_balloon.cc File chrome/browser/status_icons/desktop_notification_balloon.cc (right): https://codereview.chromium.org/1395093002/diff/1/chrome/browser/status_icons/desktop_notification_balloon.cc#newcode92 chrome/browser/status_icons/desktop_notification_balloon.cc:92: kNotifierId), On ...
5 years, 2 months ago (2015-10-09 11:21:02 UTC) #8
Peter Beverloo
lgtm % comments I'd like Justin to sign off on this as well given that ...
5 years, 2 months ago (2015-10-09 12:55:23 UTC) #10
johnme
Addressed Peter's review nits - thanks :) https://codereview.chromium.org/1395093002/diff/20001/chrome/browser/background/background_contents_service.cc File chrome/browser/background/background_contents_service.cc (right): https://codereview.chromium.org/1395093002/diff/20001/chrome/browser/background/background_contents_service.cc#newcode73 chrome/browser/background/background_contents_service.cc:73: const char ...
5 years, 2 months ago (2015-10-09 14:20:42 UTC) #11
dewittj
lgtm, thanks for the cleanup! https://codereview.chromium.org/1395093002/diff/20002/chrome/browser/status_icons/desktop_notification_balloon.cc File chrome/browser/status_icons/desktop_notification_balloon.cc (right): https://codereview.chromium.org/1395093002/diff/20002/chrome/browser/status_icons/desktop_notification_balloon.cc#newcode92 chrome/browser/status_icons/desktop_notification_balloon.cc:92: // see https://codereview.chromium.org/1387383004. optional ...
5 years, 2 months ago (2015-10-09 15:28:38 UTC) #12
johnme
Done, thanks :) https://codereview.chromium.org/1395093002/diff/20002/chrome/browser/status_icons/desktop_notification_balloon.cc File chrome/browser/status_icons/desktop_notification_balloon.cc (right): https://codereview.chromium.org/1395093002/diff/20002/chrome/browser/status_icons/desktop_notification_balloon.cc#newcode92 chrome/browser/status_icons/desktop_notification_balloon.cc:92: // see https://codereview.chromium.org/1387383004. On 2015/10/09 15:28:38, ...
5 years, 2 months ago (2015-10-12 13:54:13 UTC) #13
johnme
jochen@chromium.org: Please give owners approval for changes in chrome/browser/ (except chrome/browser/notifications/, which already has it). ...
5 years, 2 months ago (2015-10-12 14:45:07 UTC) #15
jochen (gone - plz use gerrit)
lgtm
5 years, 2 months ago (2015-10-12 14:53:25 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1395093002/70001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1395093002/70001
5 years, 2 months ago (2015-10-12 15:04:20 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:70001)
5 years, 2 months ago (2015-10-12 16:19:26 UTC) #20
commit-bot: I haz the power
5 years, 2 months ago (2015-10-12 16:20:31 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/81256f554f024571955f7f82b7fe4c7064afd238
Cr-Commit-Position: refs/heads/master@{#353529}

Powered by Google App Engine
This is Rietveld 408576698