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

Issue 661643002: Adds a context message of the security origin for web notifications. (Closed)

Created:
6 years, 2 months ago by dewittj
Modified:
5 years, 10 months ago
CC:
chromium-reviews, peter+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds a context message of the security origin for web notifications. The context message should have the following properties: * If the origin's scheme is http or https, omit it * If the scheme is http or https and the port is default, omit it. * Otherwise, format the entire URL according to net::FormatURL rules. File origins have not been updated since it's currently not possible to get the notification permission for a file:// URL; a test has been added that will fail if this becomes possible. BUG=402191 Committed: https://crrev.com/ec053615ba0c5dfe56f978437a045138f40ae9da Cr-Commit-Position: refs/heads/master@{#315659}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fixes non-http branch of URL formatter #

Patch Set 3 : Addresses comments and adds some unit tests. #

Total comments: 6

Patch Set 4 : Addresses peter's comments. #

Total comments: 6

Patch Set 5 : Rebase #

Total comments: 3

Patch Set 6 : Re-rebase. #

Patch Set 7 : Fix merge error. #

Total comments: 8

Patch Set 8 : Fix test compile #

Patch Set 9 : Address comments. #

Total comments: 4

Patch Set 10 : Address nits. #

Patch Set 11 : Merge with master #

Patch Set 12 : Adds a test to ensure that the file bug doesn't get fixed unexpectedly #

Patch Set 13 : Adds a bug reference. #

Total comments: 6

Patch Set 14 : Fixes file URL generation. #

Patch Set 15 : Updates test to check permission via the DesktopNotificationService #

Patch Set 16 : Reverts html file. #

Total comments: 2

Patch Set 17 : Adds http to the context message for that scheme. #

Patch Set 18 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -86 lines) Patch
M chrome/browser/notifications/desktop_notification_service.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/platform_notification_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +92 lines, -8 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +51 lines, -31 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +48 lines, -17 lines 0 comments Download
M chrome/browser/services/gcm/push_messaging_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/notifications/notification_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -6 lines 0 comments Download
M content/public/browser/platform_notification_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -3 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_notification_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -3 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 37 (10 generated)
dewittj
ptal mukai, peter: please let me know if you think this is an appropriate location ...
6 years, 2 months ago (2014-10-16 22:16:57 UTC) #4
Jun Mukai
lgtm https://codereview.chromium.org/661643002/diff/1/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/1/chrome/browser/notifications/desktop_notification_service.cc#newcode226 chrome/browser/notifications/desktop_notification_service.cc:226: rv.insert(rv.end(), port.begin(), port.end()); rv.append(base::UTF8ToUTF16(origin.port())) would be more concise ...
6 years, 2 months ago (2014-10-16 22:43:22 UTC) #5
Peter Beverloo
https://codereview.chromium.org/661643002/diff/1/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/1/chrome/browser/notifications/desktop_notification_service.cc#newcode222 chrome/browser/notifications/desktop_notification_service.cc:222: base::string16 rv = net::IDNToUnicode(origin.host(), languages); What does |rv| stand ...
6 years, 2 months ago (2014-10-17 11:17:59 UTC) #6
dewittj
ptal, I renamed another unit test and added some specific tests for the origin GURL ...
6 years, 2 months ago (2014-10-17 18:24:13 UTC) #7
Peter Beverloo
lgtm https://codereview.chromium.org/661643002/diff/40001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/40001/chrome/browser/notifications/desktop_notification_service.cc#newcode229 chrome/browser/notifications/desktop_notification_service.cc:229: for (extensions::ExtensionSet::const_iterator iter = extensions.begin(); nit: since you're ...
6 years, 2 months ago (2014-10-18 09:31:02 UTC) #8
dewittj
https://codereview.chromium.org/661643002/diff/40001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/40001/chrome/browser/notifications/desktop_notification_service.cc#newcode229 chrome/browser/notifications/desktop_notification_service.cc:229: for (extensions::ExtensionSet::const_iterator iter = extensions.begin(); On 2014/10/18 09:31:02, Peter ...
6 years, 1 month ago (2014-10-29 16:21:26 UTC) #9
Peter Beverloo
https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc#newcode195 chrome/browser/notifications/desktop_notification_service.cc:195: int process_id = render_frame_host->GetProcess()->GetID(); nit: You probably have to ...
6 years, 1 month ago (2014-10-29 16:25:19 UTC) #10
felt
https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc#newcode290 chrome/browser/notifications/desktop_notification_service.cc:290: return net::FormatUrl(origin, languages); is it possible for other schemes ...
6 years, 1 month ago (2014-10-30 06:40:14 UTC) #11
dewittj
https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/60001/chrome/browser/notifications/desktop_notification_service.cc#newcode195 chrome/browser/notifications/desktop_notification_service.cc:195: int process_id = render_frame_host->GetProcess()->GetID(); On 2014/10/29 16:25:19, Peter Beverloo ...
6 years, 1 month ago (2014-11-03 17:18:33 UTC) #12
felt
https://codereview.chromium.org/661643002/diff/80001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/80001/chrome/browser/notifications/desktop_notification_service.cc#newcode182 chrome/browser/notifications/desktop_notification_service.cc:182: // URL. We need a better way to display ...
6 years, 1 month ago (2014-11-04 00:50:16 UTC) #13
dewittj
peter: ptal for proper integration with your new class hierarchy here felt: no functional change ...
5 years, 11 months ago (2015-01-09 21:59:40 UTC) #15
Peter Beverloo
https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/notification_browsertest.cc File chrome/browser/notifications/notification_browsertest.cc (right): https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/notification_browsertest.cc#newcode932 chrome/browser/notifications/notification_browsertest.cc:932: IN_PROC_BROWSER_TEST_F(NotificationsTest, TestDisplayOriginContextMessage) { This should probably go in PlatformNotificationBrowserTest. ...
5 years, 11 months ago (2015-01-10 00:03:33 UTC) #16
dewittj
https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/notification_browsertest.cc File chrome/browser/notifications/notification_browsertest.cc (right): https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/notification_browsertest.cc#newcode932 chrome/browser/notifications/notification_browsertest.cc:932: IN_PROC_BROWSER_TEST_F(NotificationsTest, TestDisplayOriginContextMessage) { On 2015/01/10 00:03:33, Peter Beverloo wrote: ...
5 years, 11 months ago (2015-01-13 22:18:01 UTC) #19
Peter Beverloo
LGTM, thanks!! https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/platform_notification_service_impl.cc File chrome/browser/notifications/platform_notification_service_impl.cc (right): https://codereview.chromium.org/661643002/diff/130007/chrome/browser/notifications/platform_notification_service_impl.cc#newcode257 chrome/browser/notifications/platform_notification_service_impl.cc:257: extensions::ExtensionSystem::Get(profile)->info_map(); On 2015/01/13 22:18:01, dewittj wrote: > ...
5 years, 11 months ago (2015-01-14 19:18:14 UTC) #20
dewittj
+avi for content/ Adrienne, any opinions on landing the WebOriginDisplayName as-is? https://codereview.chromium.org/661643002/diff/190001/chrome/browser/notifications/platform_notification_service_impl.cc File chrome/browser/notifications/platform_notification_service_impl.cc (right): ...
5 years, 11 months ago (2015-01-15 22:31:35 UTC) #22
felt
https://codereview.chromium.org/661643002/diff/80001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/661643002/diff/80001/chrome/browser/notifications/desktop_notification_service.cc#newcode182 chrome/browser/notifications/desktop_notification_service.cc:182: // URL. We need a better way to display ...
5 years, 11 months ago (2015-01-17 01:40:15 UTC) #23
Avi (use Gerrit)
content lgtm
5 years, 11 months ago (2015-01-17 03:23:55 UTC) #24
dewittj
felt, peter: I added a test that will fail and log if file:// URLs become ...
5 years, 11 months ago (2015-01-27 01:51:48 UTC) #25
Peter Beverloo
Still lg % comment. Thanks for the update :-) https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc File chrome/browser/notifications/platform_notification_service_browsertest.cc (right): https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc#newcode126 chrome/browser/notifications/platform_notification_service_browsertest.cc:126: ...
5 years, 11 months ago (2015-01-27 13:37:05 UTC) #26
dewittj
https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc File chrome/browser/notifications/platform_notification_service_browsertest.cc (right): https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc#newcode126 chrome/browser/notifications/platform_notification_service_browsertest.cc:126: } // namespace On 2015/01/27 13:37:04, Peter Beverloo wrote: ...
5 years, 11 months ago (2015-01-27 23:10:12 UTC) #28
Peter Beverloo
On 2015/01/27 23:10:12, dewittj wrote: > https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc > File chrome/browser/notifications/platform_notification_service_browsertest.cc > (right): > > https://codereview.chromium.org/661643002/diff/270001/chrome/browser/notifications/platform_notification_service_browsertest.cc#newcode126 ...
5 years, 10 months ago (2015-01-28 10:21:41 UTC) #29
felt
Thanks for doing this. https://codereview.chromium.org/661643002/diff/350001/chrome/browser/notifications/platform_notification_service_impl.cc File chrome/browser/notifications/platform_notification_service_impl.cc (right): https://codereview.chromium.org/661643002/diff/350001/chrome/browser/notifications/platform_notification_service_impl.cc#newcode256 chrome/browser/notifications/platform_notification_service_impl.cc:256: } I'm fine with dropping ...
5 years, 10 months ago (2015-01-29 20:22:44 UTC) #30
dewittj
Not a url parsing expert, but added the scheme the same way that FormatURL does; ...
5 years, 10 months ago (2015-02-02 19:42:58 UTC) #31
felt
On 2015/02/02 19:42:58, dewittj wrote: > Not a url parsing expert, but added the scheme ...
5 years, 10 months ago (2015-02-04 10:45:34 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/661643002/380001
5 years, 10 months ago (2015-02-10 21:47:43 UTC) #35
commit-bot: I haz the power
Committed patchset #18 (id:380001)
5 years, 10 months ago (2015-02-10 22:34:24 UTC) #36
commit-bot: I haz the power
5 years, 10 months ago (2015-02-10 22:35:14 UTC) #37
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/ec053615ba0c5dfe56f978437a045138f40ae9da
Cr-Commit-Position: refs/heads/master@{#315659}

Powered by Google App Engine
This is Rietveld 408576698