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

Issue 194108: adds DesktopNotificationService to Profile (Closed)

Created:
11 years, 3 months ago by John Gregg
Modified:
9 years ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

adds DesktopNotificationService to Profile part of the browser-side code for desktop notifications. UI code is in separate CL.

Patch Set 1 #

Patch Set 2 : lint fixes #

Total comments: 80

Patch Set 3 : deal with threading #

Patch Set 4 : fix merge problem #

Total comments: 5

Patch Set 5 : address feedback #

Total comments: 43

Patch Set 6 : address feedback #

Patch Set 7 : untabify #

Total comments: 54

Patch Set 8 : now with more GURLs #

Total comments: 35

Patch Set 9 : code review #

Total comments: 19

Patch Set 10 : extract prefs cache, other feedback #

Patch Set 11 : more feedback #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+1186 lines, -5 lines) Patch
M chrome/app/chromium_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 1 comment Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/automation/automation_profile_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/notifications/balloons.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +196 lines, -0 lines 3 comments Download
A chrome/browser/notifications/desktop_notification_service.h View 1 2 3 4 5 6 7 8 9 1 chunk +78 lines, -0 lines 0 comments Download
A chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 5 6 7 8 9 1 chunk +234 lines, -0 lines 2 comments Download
A chrome/browser/notifications/desktop_notification_service_linux.cc View 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/notifications/desktop_notification_service_mac.mm View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/notifications/desktop_notification_service_win.cc View 1 2 3 4 5 6 7 1 chunk +97 lines, -0 lines 3 comments Download
A chrome/browser/notifications/notification.h View 1 2 3 4 5 6 7 8 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_object_proxy.h View 1 2 3 4 5 6 7 8 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_object_proxy.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_ui_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +65 lines, -0 lines 1 comment Download
A chrome/browser/notifications/notifications_prefs_cache.h View 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notifications_prefs_cache.cc View 1 chunk +67 lines, -0 lines 0 comments Download
M chrome/browser/profile.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 3 4 5 6 7 8 9 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 3 4 5 6 7 8 9 4 chunks +11 lines, -0 lines 0 comments Download
A chrome/browser/resources/notification.html View 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/notification_provider.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
jorlow
This patch is still bigger than I like to review. I think the profile stuff ...
11 years, 3 months ago (2009-09-15 22:23:01 UTC) #1
jam
http://codereview.chromium.org/194108/diff/1004/1028 File chrome/common/render_messages_internal.h (right): http://codereview.chromium.org/194108/diff/1004/1028#newcode1599 Line 1599: IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_CheckNotificationPermission, We avoid sync messages to the UI ...
11 years, 3 months ago (2009-09-15 22:32:43 UTC) #2
John Gregg
I had trouble with this particular IPC message -- I did get an assert when ...
11 years, 3 months ago (2009-09-15 22:39:02 UTC) #3
jorlow
On Tue, Sep 15, 2009 at 3:39 PM, <johnnyg@chromium.org> wrote: > Reviewers: Jeremy Orlow, John ...
11 years, 3 months ago (2009-09-15 22:52:03 UTC) #4
jam
On Tue, Sep 15, 2009 at 3:39 PM, <johnnyg@chromium.org> wrote: > > Reviewers: Jeremy Orlow, ...
11 years, 3 months ago (2009-09-15 22:54:16 UTC) #5
John Gregg
> No. This means you're running a nested message loop which opens up the door ...
11 years, 3 months ago (2009-09-15 23:41:41 UTC) #6
jam
On Tue, Sep 15, 2009 at 4:41 PM, <johnnyg@chromium.org> wrote: > > No. This means ...
11 years, 3 months ago (2009-09-15 23:47:41 UTC) #7
John Gregg
thanks for all the comments! I've incorporated most of them, and am working on replacing ...
11 years, 3 months ago (2009-09-18 19:11:32 UTC) #8
jam
> looks like my other issue is how to deal with io_thread shutdown and cleanly ...
11 years, 3 months ago (2009-09-18 19:34:20 UTC) #9
John Gregg
> What exact issues are you worried about? That some objects might be leaked > ...
11 years, 3 months ago (2009-09-18 19:50:30 UTC) #10
jam
On Fri, Sep 18, 2009 at 12:50 PM, <johnnyg@chromium.org> wrote: > What exact issues are ...
11 years, 3 months ago (2009-09-18 20:47:04 UTC) #11
jorlow
On Fri, Sep 18, 2009 at 1:46 PM, John Abd-El-Malek <jam@chromium.org> wrote: > > > ...
11 years, 3 months ago (2009-09-18 20:57:59 UTC) #12
jorlow
http://codereview.chromium.org/194108/diff/1004/1011 File chrome/browser/notifications/desktop_notification_service.h (right): http://codereview.chromium.org/194108/diff/1004/1011#newcode66 Line 66: friend class NotificationPermissionInfoBarDelegate; On 2009/09/18 19:11:33, John Gregg ...
11 years, 3 months ago (2009-09-18 20:58:54 UTC) #13
John Gregg
new code posted which deals with threading issues. http://codereview.chromium.org/194108/diff/1004/1020 File chrome/browser/renderer_host/render_view_host.cc (right): http://codereview.chromium.org/194108/diff/1004/1020#newcode842 Line 842: ...
11 years, 3 months ago (2009-09-21 17:54:08 UTC) #14
jam
http://codereview.chromium.org/194108/diff/1004/1020 File chrome/browser/renderer_host/render_view_host.cc (right): http://codereview.chromium.org/194108/diff/1004/1020#newcode842 Line 842: IPC_MESSAGE_HANDLER(ViewHostMsg_CheckNotificationPermission, On 2009/09/21 17:54:09, John Gregg wrote: > ...
11 years, 3 months ago (2009-09-21 22:36:57 UTC) #15
John Gregg
http://codereview.chromium.org/194108/diff/11004/11010 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/194108/diff/11004/11010#newcode277 Line 277: g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, On 2009/09/21 22:36:57, John Abd-El-Malek wrote: > ...
11 years, 3 months ago (2009-09-22 18:24:57 UTC) #16
jorlow
My brain's mush....I'll try to finish reviewing the service tomorrow. http://codereview.chromium.org/194108/diff/11004/11010 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/194108/diff/11004/11010#newcode277 ...
11 years, 2 months ago (2009-09-24 01:44:49 UTC) #17
darin (slow to review)
some brief comments: http://codereview.chromium.org/194108/diff/12004/12015 File chrome/browser/notifications/notification_object_proxy.cc (right): http://codereview.chromium.org/194108/diff/12004/12015#newcode60 Line 60: NewRunnableMethod(this, &NotificationObjectProxy::Send, message)); big time ...
11 years, 2 months ago (2009-09-24 05:33:28 UTC) #18
John Gregg
addressed the style points and fixed the thread safety mistake; also eliminated some tasks which ...
11 years, 2 months ago (2009-09-28 19:14:04 UTC) #19
jorlow
Addressing comments. Will do another review in a bit. http://codereview.chromium.org/194108/diff/12004/12014 File chrome/browser/notifications/notification.h (right): http://codereview.chromium.org/194108/diff/12004/12014#newcode23 Line ...
11 years, 2 months ago (2009-09-28 20:48:27 UTC) #20
michaeln
Jeremy asked to borrow my eyes on this one. Some initial comments. Generally looks pretty ...
11 years, 2 months ago (2009-10-01 01:29:20 UTC) #21
michaeln
http://codereview.chromium.org/194108/diff/20003/20009 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/194108/diff/20003/20009#newcode181 Line 181: } nit: chrome style would generally not have ...
11 years, 2 months ago (2009-10-01 18:17:06 UTC) #22
John Gregg
Thanks for helping out Michael! I'm working on a new patch that addresses your comments, ...
11 years, 2 months ago (2009-10-02 18:02:01 UTC) #23
jorlow
Oops...I forgot to publish my last set of comments. As it turns out, Michael caught ...
11 years, 2 months ago (2009-10-02 18:57:32 UTC) #24
michaeln
On 2009/10/02 18:02:01, John Gregg wrote: > Thanks for helping out Michael! I'm working on ...
11 years, 2 months ago (2009-10-02 21:06:47 UTC) #25
John Gregg
new code posted addressing the comments. http://codereview.chromium.org/194108/diff/20003/20009 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/194108/diff/20003/20009#newcode46 Line 46: RenderViewHost::FromID(process_id_, route_id_)->Send( ...
11 years, 2 months ago (2009-10-06 17:02:34 UTC) #26
John Gregg
Also, in response to the point about test_shell support. Yes, this is required and it's ...
11 years, 2 months ago (2009-10-07 00:47:00 UTC) #27
michaeln
I still haven't made it all the way thru... the biggest material thing i have ...
11 years, 2 months ago (2009-10-08 06:46:44 UTC) #28
John Gregg
http://codereview.chromium.org/194108/diff/30002/22008 File chrome/browser/notifications/balloons.h (right): http://codereview.chromium.org/194108/diff/30002/22008#newcode38 Line 38: class BalloonCollectionInterface { On 2009/10/08 06:46:44, michaeln wrote: ...
11 years, 2 months ago (2009-10-08 21:54:35 UTC) #29
jorlow
I didn't re-read the updated code, but assuming you didn't do anything besides what was ...
11 years, 2 months ago (2009-10-08 23:12:10 UTC) #30
michaeln
Its tricky to review this half without seeing the other half. http://codereview.chromium.org/194108/diff/30002/22008 File chrome/browser/notifications/balloons.h (right): ...
11 years, 2 months ago (2009-10-09 03:23:37 UTC) #31
John Gregg
http://codereview.chromium.org/194108/diff/30002/22008 File chrome/browser/notifications/balloons.h (right): http://codereview.chromium.org/194108/diff/30002/22008#newcode98 Line 98: void AddObserver(BalloonCollectionObserver* observer); Seems sufficient here; I will ...
11 years, 2 months ago (2009-10-09 21:51:33 UTC) #32
jorlow
At this point, I think we should just start differing anything other than major concerns ...
11 years, 2 months ago (2009-10-09 22:23:37 UTC) #33
John Gregg
http://codereview.chromium.org/194108/diff/33007/34018 File chrome/browser/notifications/notification_ui_manager.h (right): http://codereview.chromium.org/194108/diff/33007/34018#newcode24 Line 24: class NotificationUIManager : public BalloonCollectionObserver { > That's ...
11 years, 2 months ago (2009-10-09 23:03:13 UTC) #34
michaeln
Let me know when you have a new snapshot to look at, we gotta get ...
11 years, 2 months ago (2009-10-09 23:28:31 UTC) #35
John Gregg
On 2009/10/09 23:28:31, michaeln wrote: > Let me know when you have a new snapshot ...
11 years, 2 months ago (2009-10-09 23:49:06 UTC) #36
michaeln
Modulo a couple of minor comments, LGTM I'd suggest deferring the addition of the UIManager.h ...
11 years, 2 months ago (2009-10-10 19:10:51 UTC) #37
John Gregg
Okay I made these changes; I also took your suggestion and removed notification_ui_manager.h from this ...
11 years, 2 months ago (2009-10-12 05:46:15 UTC) #38
michaeln
http://codereview.chromium.org/194108/diff/41059/41069 File chrome/browser/notifications/desktop_notification_service_win.cc (right): http://codereview.chromium.org/194108/diff/41059/41069#newcode5 Line 5: #include "chrome/browser/notifications/desktop_notification_service.h" Also, there's nothing windowzy about this ...
11 years, 2 months ago (2009-10-12 16:27:52 UTC) #39
John Gregg
http://codereview.chromium.org/194108/diff/41059/41069 File chrome/browser/notifications/desktop_notification_service_win.cc (right): http://codereview.chromium.org/194108/diff/41059/41069#newcode5 Line 5: #include "chrome/browser/notifications/desktop_notification_service.h" The current design is that only ...
11 years, 2 months ago (2009-10-12 16:37:37 UTC) #40
TVL
11 years, 2 months ago (2009-10-14 17:34:22 UTC) #41
http://codereview.chromium.org/194108/diff/41059/41060
File chrome/app/chromium_strings.grd (right):

http://codereview.chromium.org/194108/diff/41059/41060#newcode366
Line 366: Allow <ph name="site">$1<ex>mail.google.com</ex></ph> to show desktop
notifications?
Mark is fixing this, but...

Why does this need to be in the branding file, it does not have branding?

Adding to this file and not google_chrome_strings.grd also broke a lot of
strings because now the indexes don't match for every resource after this
between the two files.

Powered by Google App Engine
This is Rietveld 408576698