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 1847863002: Move notification resource loading from content/child to blink (Closed)

Created:
4 years, 8 months ago by Michael van Ouwerkerk
Modified:
4 years, 8 months ago
CC:
chromium-reviews, Peter Beverloo, mlamouri+watch-notifications_chromium.org, jam, haraken, dglazkov+blink, darin-cc_chromium.org, blink-reviews, blink-reviews-api_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move notification resource loading from content/child to blink. * The Notification and ServiceWorkerRegistrationNotifications classes now kick off the resource loading in blink. * Add in blink: WebNotificationResources, NotificationImageLoader, NotificationResourcesLoader, NotificationResourcesLoaderTest * Delete from content: NotificationImageLoader, PendingNotification, PendingNotificationsTracker, PendingNotificationsTrackerTest * I'll leave restoring the UMA histogram reporting to a followup CL. * Adds skia/ext to modules/DEPS for skia::ImageOperations BUG=592188 TBR=kinuko Committed: https://crrev.com/9148e8aa500ceb93d3f1cb3abbd3b09afd65d12f Cr-Commit-Position: refs/heads/master@{#388174}

Patch Set 1 #

Patch Set 2 : WIP persistent notifications and unit test. #

Patch Set 3 : Rebase. Additional tests and cleanup. #

Patch Set 4 : Delete unused images from content and add documentation. #

Patch Set 5 : Use a pre-finalizer to stop image loaders. #

Patch Set 6 : Fix some edge cases exposed by tests. #

Patch Set 7 : Minor cleanups. #

Patch Set 8 : Rebase. Fix reference cycle triggering ASSERT in ThreadState::cleanup. #

Patch Set 9 : ImageFrame::getSkBitmap was removed. #

Total comments: 64

Patch Set 10 : Address peter's comments. Add debug logging for ASAN. #

Patch Set 11 : Call stop when all fetches have finished. #

Total comments: 6

Patch Set 12 : Clear SharedBuffer references aggressively. Add debug logging. #

Patch Set 13 : Rebase. Fix ASAN. Cleanups. Address peter's comments. #

Total comments: 10

Patch Set 14 : Address peter's comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+865 lines, -1073 lines) Patch
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M content/child/notifications/notification_dispatcher.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
D content/child/notifications/notification_image_loader.h View 1 2 1 chunk +0 lines, -116 lines 0 comments Download
D content/child/notifications/notification_image_loader.cc View 1 2 1 chunk +0 lines, -121 lines 0 comments Download
M content/child/notifications/notification_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +7 lines, -33 lines 0 comments Download
M content/child/notifications/notification_manager.cc View 1 2 3 4 5 6 7 8 9 9 chunks +40 lines, -101 lines 0 comments Download
D content/child/notifications/pending_notification.h View 1 2 1 chunk +0 lines, -78 lines 0 comments Download
D content/child/notifications/pending_notification.cc View 1 2 1 chunk +0 lines, -123 lines 0 comments Download
D content/child/notifications/pending_notifications_tracker.h View 1 2 1 chunk +0 lines, -84 lines 0 comments Download
D content/child/notifications/pending_notifications_tracker.cc View 1 2 1 chunk +0 lines, -75 lines 0 comments Download
D content/child/notifications/pending_notifications_tracker_unittest.cc View 1 2 1 chunk +0 lines, -299 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -6 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
D content/test/data/notifications/100x100.png View 1 2 3 Binary file 0 comments Download
D content/test/data/notifications/110x110.png View 1 2 3 Binary file 0 comments Download
D content/test/data/notifications/120x120.png View 1 2 3 Binary file 0 comments Download
D content/test/data/notifications/48x48.png View 1 2 3 Binary file 0 comments Download
D content/test/data/notifications/500x500.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/Source/modules/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/Notification.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +25 lines, -10 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +63 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +120 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +78 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +134 lines, -0 lines 2 comments Download
A third_party/WebKit/Source/modules/notifications/NotificationResourcesLoaderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +240 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +36 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +66 lines, -11 lines 0 comments Download
A + third_party/WebKit/Source/web/tests/data/notifications/100x100.png View 1 2 3 Binary file 0 comments Download
A + third_party/WebKit/Source/web/tests/data/notifications/110x110.png View 1 2 3 Binary file 0 comments Download
A + third_party/WebKit/Source/web/tests/data/notifications/120x120.png View 1 2 3 Binary file 0 comments Download
A + third_party/WebKit/Source/web/tests/data/notifications/48x48.png View 1 2 3 Binary file 0 comments Download
A + third_party/WebKit/Source/web/tests/data/notifications/500x500.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
A third_party/WebKit/public/platform/modules/notifications/WebNotificationResources.h View 1 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 85 (40 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/1
4 years, 8 months ago (2016-03-31 16:18:06 UTC) #3
Michael van Ouwerkerk
Peter: for your entertainment. I'll let you know when it is really for your review ...
4 years, 8 months ago (2016-03-31 16:18:37 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/162652)
4 years, 8 months ago (2016-03-31 16:28:10 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/20001
4 years, 8 months ago (2016-04-07 17:36:07 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/165866)
4 years, 8 months ago (2016-04-07 17:47:40 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/40001
4 years, 8 months ago (2016-04-12 12:16:27 UTC) #13
commit-bot: I haz the power
Dry run: 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/144415)
4 years, 8 months ago (2016-04-12 13:08:34 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/60001
4 years, 8 months ago (2016-04-12 13:27:38 UTC) #17
Michael van Ouwerkerk
Peter, could you take a look please? There seems to be an issue with the ...
4 years, 8 months ago (2016-04-12 14:00:23 UTC) #19
commit-bot: I haz the power
Dry run: 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/144444)
4 years, 8 months ago (2016-04-12 14:26:52 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/80001
4 years, 8 months ago (2016-04-12 15:39:50 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/100001
4 years, 8 months ago (2016-04-12 16:16:10 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/120001
4 years, 8 months ago (2016-04-12 17:03:17 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/52386)
4 years, 8 months ago (2016-04-12 18:32:26 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/140001
4 years, 8 months ago (2016-04-13 13:14:15 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/144077) mac_chromium_gn_rel on ...
4 years, 8 months ago (2016-04-13 13:31:13 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/160001
4 years, 8 months ago (2016-04-13 13:47:28 UTC) #36
commit-bot: I haz the power
Dry run: 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/145194)
4 years, 8 months ago (2016-04-13 15:53:27 UTC) #38
Peter Beverloo
This looks really good, Michael! This CL will also enable us to move to Mojo ...
4 years, 8 months ago (2016-04-13 18:32:28 UTC) #39
haraken
https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode152 third_party/WebKit/Source/modules/notifications/Notification.cpp:152: bind<NotificationResourcesLoader*>(&Notification::didLoadResources, On 2016/04/13 18:32:27, Peter Beverloo wrote: > Why ...
4 years, 8 months ago (2016-04-14 02:05:53 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/180001
4 years, 8 months ago (2016-04-14 13:41:14 UTC) #44
Michael van Ouwerkerk
Thanks Peter! Please take another look. I couldn't reproduce the ASAN issue locally -_- https://codereview.chromium.org/1847863002/diff/160001/content/child/notifications/notification_manager.cc ...
4 years, 8 months ago (2016-04-14 13:42:12 UTC) #45
hiroshige
https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode152 third_party/WebKit/Source/modules/notifications/Notification.cpp:152: bind<NotificationResourcesLoader*>(&Notification::didLoadResources, On 2016/04/14 13:42:11, Michael van Ouwerkerk wrote: > ...
4 years, 8 months ago (2016-04-14 14:49:22 UTC) #46
hiroshige
4 years, 8 months ago (2016-04-14 14:49:37 UTC) #48
Michael van Ouwerkerk
https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp File third_party/WebKit/Source/modules/notifications/Notification.cpp (right): https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.cpp#newcode152 third_party/WebKit/Source/modules/notifications/Notification.cpp:152: bind<NotificationResourcesLoader*>(&Notification::didLoadResources, On 2016/04/14 14:49:22, hiroshige wrote: > On 2016/04/14 ...
4 years, 8 months ago (2016-04-14 14:54:41 UTC) #49
commit-bot: I haz the power
Dry run: 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/145913)
4 years, 8 months ago (2016-04-14 15:42:28 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/200001
4 years, 8 months ago (2016-04-14 15:54:59 UTC) #53
commit-bot: I haz the power
Dry run: 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/145999)
4 years, 8 months ago (2016-04-14 17:45:25 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/220001
4 years, 8 months ago (2016-04-15 11:05:27 UTC) #57
Peter Beverloo
A few more thoughts, I'll debug the ASAN issue today as well. https://codereview.chromium.org/1847863002/diff/160001/third_party/WebKit/Source/modules/notifications/Notification.h File third_party/WebKit/Source/modules/notifications/Notification.h ...
4 years, 8 months ago (2016-04-15 11:07:29 UTC) #58
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/54391)
4 years, 8 months ago (2016-04-15 12:15:52 UTC) #60
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/240001
4 years, 8 months ago (2016-04-18 11:24:56 UTC) #62
Michael van Ouwerkerk
Thanks Peter. Please take another look. https://codereview.chromium.org/1847863002/diff/200001/content/child/notifications/notification_manager.h File content/child/notifications/notification_manager.h (right): https://codereview.chromium.org/1847863002/diff/200001/content/child/notifications/notification_manager.h#newcode56 content/child/notifications/notification_manager.h:56: // displayed. On ...
4 years, 8 months ago (2016-04-18 11:26:53 UTC) #63
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-18 12:31:45 UTC) #65
Peter Beverloo
lgtm May want to add a line to the CL description about some of the ...
4 years, 8 months ago (2016-04-18 15:22:37 UTC) #66
Michael van Ouwerkerk
Thanks Peter. https://codereview.chromium.org/1847863002/diff/240001/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h File third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h (right): https://codereview.chromium.org/1847863002/diff/240001/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h#newcode12 third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h:12: #include "third_party/skia/include/core/SkBitmap.h" On 2016/04/18 15:22:37, Peter Beverloo ...
4 years, 8 months ago (2016-04-18 17:03:15 UTC) #67
Michael van Ouwerkerk
TBR haraken for modules/DEPS and kinuko for blink_platform_impl.cc Thanks!
4 years, 8 months ago (2016-04-18 17:06:05 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/260001
4 years, 8 months ago (2016-04-18 17:06:55 UTC) #73
Michael van Ouwerkerk
Kentaro: I have it on good advice that maybe TBR'ing a DEPS change is not ...
4 years, 8 months ago (2016-04-18 17:11:24 UTC) #76
haraken
In terms of implementation, WebKit changes LGTM https://codereview.chromium.org/1847863002/diff/260001/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp File third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp (right): https://codereview.chromium.org/1847863002/diff/260001/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp#newcode83 third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp:83: imageLoader->stop(); Would ...
4 years, 8 months ago (2016-04-19 01:12:52 UTC) #77
kinuko
Just noticed this, \o/ no more loader code in content! (lgtm for content/child changes)
4 years, 8 months ago (2016-04-19 02:31:41 UTC) #78
Michael van Ouwerkerk
Thanks for the reviews! https://codereview.chromium.org/1847863002/diff/260001/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp File third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp (right): https://codereview.chromium.org/1847863002/diff/260001/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp#newcode83 third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp:83: imageLoader->stop(); On 2016/04/19 01:12:52, haraken ...
4 years, 8 months ago (2016-04-19 09:47:31 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847863002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847863002/260001
4 years, 8 months ago (2016-04-19 09:47:49 UTC) #81
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 8 months ago (2016-04-19 09:52:19 UTC) #83
commit-bot: I haz the power
4 years, 8 months ago (2016-04-19 09:53:19 UTC) #85
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/9148e8aa500ceb93d3f1cb3abbd3b09afd65d12f
Cr-Commit-Position: refs/heads/master@{#388174}

Powered by Google App Engine
This is Rietveld 408576698