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

Issue 1948223004: Introduce the Blink NotificationService, move permission checks there (Closed)

Created:
4 years, 7 months ago by Peter Beverloo
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, mlamouri (slow - plz ping), nasko+codewatch_chromium.org, qsr+mojo_chromium.org, Sam McNally, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce the Blink NotificationService, move permission checks there This introduces the Mojo NotificationService in Blink and moves permission checks over from the IPC code-path to the Mojo code-path. BUG=595685 Committed: https://crrev.com/c5987942de604fb5d51ef70e208931b713522955 Cr-Commit-Position: refs/heads/master@{#394185}

Patch Set 1 #

Total comments: 5

Patch Set 2 : OWNERS + thread jump when connecting #

Total comments: 11

Patch Set 3 : gn fix, comments #

Total comments: 12

Patch Set 4 : #

Patch Set 5 : rebase #

Total comments: 9

Patch Set 6 : #

Patch Set 7 : rebase #

Patch Set 8 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -60 lines) Patch
M content/browser/DEPS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/notifications/blink_notification_service_impl.h View 1 chunk +53 lines, -0 lines 0 comments Download
A content/browser/notifications/blink_notification_service_impl.cc View 1 2 3 1 chunk +71 lines, -0 lines 0 comments Download
M content/browser/notifications/notification_message_filter.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/notifications/notification_message_filter.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/notifications/platform_notification_context_impl.h View 1 2 3 5 chunks +26 lines, -1 line 0 comments Download
M content/browser/notifications/platform_notification_context_impl.cc View 1 2 3 4 5 6 7 3 chunks +41 lines, -1 line 1 comment Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M content/child/notifications/notification_manager.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/notifications/notification_manager.cc View 1 2 3 4 5 1 chunk +0 lines, -14 lines 0 comments Download
M content/common/platform_notification_messages.h View 2 chunks +0 lines, -6 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/mojo/blink_service_registry_impl.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/mojo/blink_service_registry_impl.cc View 1 2 3 4 5 1 chunk +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.h View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.cpp View 1 2 3 4 5 4 chunks +4 lines, -10 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationManager.h View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationManager.cpp View 1 2 3 4 5 1 chunk +67 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/blink.gyp View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/notifications/OWNERS View 1 1 chunk +15 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h View 1 2 3 4 5 2 chunks +0 lines, -9 lines 0 comments Download
A third_party/WebKit/public/platform/modules/notifications/notification_service.mojom View 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (16 generated)
Peter Beverloo
+sammc for a question This will be the first step in moving Notifications over, full ...
4 years, 7 months ago (2016-05-05 16:43:53 UTC) #2
Peter Beverloo
+Ken as he might know the answer too
4 years, 7 months ago (2016-05-05 16:47:34 UTC) #3
Ken Rockot(use gerrit already)
On 2016/05/05 at 16:47:34, peter wrote: > +Ken as he might know the answer too ...
4 years, 7 months ago (2016-05-05 16:57:42 UTC) #4
dcheng
Please update the OWNERS file to add mojom security reviewers. Thanks!
4 years, 7 months ago (2016-05-05 16:59:28 UTC) #5
Peter Beverloo
+mvanouwerkerk for notifications +esprehn for blink_service_registry_impl.cc +dcheng for security Elliot, a Mojo service must be ...
4 years, 7 months ago (2016-05-05 17:49:04 UTC) #7
haraken
https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/OWNERS File third_party/WebKit/public/platform/modules/notifications/OWNERS (right): https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/OWNERS#newcode4 third_party/WebKit/public/platform/modules/notifications/OWNERS:4: # introducing new sandbox escapes. dcheng@: Do we need ...
4 years, 7 months ago (2016-05-06 00:41:12 UTC) #9
dcheng
https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/OWNERS File third_party/WebKit/public/platform/modules/notifications/OWNERS (right): https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/OWNERS#newcode4 third_party/WebKit/public/platform/modules/notifications/OWNERS:4: # introducing new sandbox escapes. On 2016/05/06 at 00:41:12, ...
4 years, 7 months ago (2016-05-06 01:06:36 UTC) #10
Sam McNally
https://codereview.chromium.org/1948223004/diff/1/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp File third_party/WebKit/Source/modules/notifications/NotificationManager.cpp (right): https://codereview.chromium.org/1948223004/diff/1/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp#newcode47 third_party/WebKit/Source/modules/notifications/NotificationManager.cpp:47: Platform::current()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_service)); On 2016/05/05 16:43:53, Peter Beverloo wrote: > @sammc ...
4 years, 7 months ago (2016-05-06 05:14:09 UTC) #11
Michael van Ouwerkerk
https://codereview.chromium.org/1948223004/diff/1/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp File third_party/WebKit/Source/modules/notifications/NotificationManager.cpp (right): https://codereview.chromium.org/1948223004/diff/1/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp#newcode47 third_party/WebKit/Source/modules/notifications/NotificationManager.cpp:47: Platform::current()->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_service)); On 2016/05/06 05:14:09, Sam McNally wrote: > On ...
4 years, 7 months ago (2016-05-06 10:46:07 UTC) #12
Michael van Ouwerkerk
notifications lgtm with nit https://codereview.chromium.org/1948223004/diff/20001/content/browser/notifications/platform_notification_context_impl.cc File content/browser/notifications/platform_notification_context_impl.cc (right): https://codereview.chromium.org/1948223004/diff/20001/content/browser/notifications/platform_notification_context_impl.cc#newcode113 content/browser/notifications/platform_notification_context_impl.cc:113: base::Bind(&PlatformNotificationContextImpl::CreateServiceOnIO, this, Should this use ...
4 years, 7 months ago (2016-05-06 11:45:20 UTC) #13
Peter Beverloo
Thank you for the comments! PTAL > However, if the service has some scoping to ...
4 years, 7 months ago (2016-05-06 14:51:33 UTC) #14
mlamouri (slow - plz ping)
https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/notification_service.mojom File third_party/WebKit/public/platform/modules/notifications/notification_service.mojom (right): https://codereview.chromium.org/1948223004/diff/20001/third_party/WebKit/public/platform/modules/notifications/notification_service.mojom#newcode14 third_party/WebKit/public/platform/modules/notifications/notification_service.mojom:14: [Sync] GetPermissionStatus(string origin) => (PermissionStatus status); On 2016/05/06 at ...
4 years, 7 months ago (2016-05-07 12:55:25 UTC) #16
dcheng
https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc File content/browser/notifications/blink_notification_service_impl.cc (right): https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc#newcode21 content/browser/notifications/blink_notification_service_impl.cc:21: PlatformNotificationService* service() { Nit: Should be called Service() https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc#newcode50 ...
4 years, 7 months ago (2016-05-10 06:54:46 UTC) #18
Peter Beverloo
https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc File content/browser/notifications/blink_notification_service_impl.cc (right): https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc#newcode21 content/browser/notifications/blink_notification_service_impl.cc:21: PlatformNotificationService* service() { On 2016/05/10 06:54:46, dcheng wrote: > ...
4 years, 7 months ago (2016-05-10 13:32:55 UTC) #19
dcheng
+cmumford as well, who I'm told is working on typemapping for url.mojom.Origin in Blink. https://codereview.chromium.org/1948223004/diff/40001/content/browser/notifications/blink_notification_service_impl.cc ...
4 years, 7 months ago (2016-05-11 21:26:40 UTC) #21
Peter Beverloo
+jam for content DEPS and render_process_host_impl.cc Friendly ping to the other reviewers, is anything blocking ...
4 years, 7 months ago (2016-05-12 19:58:04 UTC) #22
esprehn
https://codereview.chromium.org/1948223004/diff/80001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1948223004/diff/80001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode56 third_party/WebKit/Source/modules/notifications/Notification.cpp:56: #include "public/platform/modules/permissions/permission_status.mojom.h" .mojom-blink.h, you want to use the blink ...
4 years, 7 months ago (2016-05-12 21:03:47 UTC) #25
jam
https://codereview.chromium.org/1948223004/diff/80001/content/browser/notifications/blink_notification_service_impl.cc File content/browser/notifications/blink_notification_service_impl.cc (right): https://codereview.chromium.org/1948223004/diff/80001/content/browser/notifications/blink_notification_service_impl.cc#newcode27 content/browser/notifications/blink_notification_service_impl.cc:27: BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( this class seems to serve little purpose, i.e. ...
4 years, 7 months ago (2016-05-13 01:00:20 UTC) #26
Peter Beverloo
On 2016/05/13 01:00:20, jam wrote: > https://codereview.chromium.org/1948223004/diff/80001/content/browser/notifications/blink_notification_service_impl.cc > File content/browser/notifications/blink_notification_service_impl.cc (right): > > https://codereview.chromium.org/1948223004/diff/80001/content/browser/notifications/blink_notification_service_impl.cc#newcode27 > ...
4 years, 7 months ago (2016-05-13 01:45:42 UTC) #27
Peter Beverloo
PTAL. https://codereview.chromium.org/1948223004/diff/80001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1948223004/diff/80001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode56 third_party/WebKit/Source/modules/notifications/Notification.cpp:56: #include "public/platform/modules/permissions/permission_status.mojom.h" On 2016/05/12 21:03:47, esprehn wrote: > ...
4 years, 7 months ago (2016-05-13 15:10:13 UTC) #28
esprehn
lgtm
4 years, 7 months ago (2016-05-13 17:22:42 UTC) #29
jam
On 2016/05/13 01:45:42, Peter Beverloo wrote: > On 2016/05/13 01:00:20, jam wrote: > > > ...
4 years, 7 months ago (2016-05-13 17:55:16 UTC) #30
ncarter (slow)
drive-by https://codereview.chromium.org/1948223004/diff/1/content/browser/notifications/blink_notification_service_impl.h File content/browser/notifications/blink_notification_service_impl.h (right): https://codereview.chromium.org/1948223004/diff/1/content/browser/notifications/blink_notification_service_impl.h#newcode18 content/browser/notifications/blink_notification_service_impl.h:18: // Implementation of the NotificationService used for Web ...
4 years, 7 months ago (2016-05-13 22:04:16 UTC) #31
jam
https://codereview.chromium.org/1948223004/diff/1/content/browser/notifications/blink_notification_service_impl.h File content/browser/notifications/blink_notification_service_impl.h (right): https://codereview.chromium.org/1948223004/diff/1/content/browser/notifications/blink_notification_service_impl.h#newcode18 content/browser/notifications/blink_notification_service_impl.h:18: // Implementation of the NotificationService used for Web Notifications. ...
4 years, 7 months ago (2016-05-13 22:16:47 UTC) #32
dcheng
mojom lgtm
4 years, 7 months ago (2016-05-13 22:18:18 UTC) #33
haraken
LGTM
4 years, 7 months ago (2016-05-14 00:17:52 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1948223004/110001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1948223004/110001
4 years, 7 months ago (2016-05-17 09:55:09 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/162686)
4 years, 7 months ago (2016-05-17 11:26:54 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1948223004/130001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1948223004/130001
4 years, 7 months ago (2016-05-17 14:43:40 UTC) #42
commit-bot: I haz the power
Committed patchset #8 (id:130001)
4 years, 7 months ago (2016-05-17 19:22:31 UTC) #44
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/c5987942de604fb5d51ef70e208931b713522955 Cr-Commit-Position: refs/heads/master@{#394185}
4 years, 7 months ago (2016-05-17 19:24:02 UTC) #46
yzshen1
https://codereview.chromium.org/1948223004/diff/130001/content/browser/notifications/platform_notification_context_impl.cc File content/browser/notifications/platform_notification_context_impl.cc (right): https://codereview.chromium.org/1948223004/diff/130001/content/browser/notifications/platform_notification_context_impl.cc#newcode116 content/browser/notifications/platform_notification_context_impl.cc:116: weak_factory_to_io_.GetWeakPtr(), render_process_id, Not sure whether it is relevant to ...
4 years, 7 months ago (2016-05-18 15:28:56 UTC) #48
Peter Beverloo
4 years, 7 months ago (2016-05-18 18:20:34 UTC) #49
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:130001) has been created in
https://codereview.chromium.org/1995663003/ by peter@chromium.org.

The reason for reverting is: Causing crashes for users on Windows. Reverting.

BUG=612770.

Powered by Google App Engine
This is Rietveld 408576698