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

Issue 15295018: Continue bitmap fetching for notifications. (Closed)

Created:
7 years, 7 months ago by Pete Williamson
Modified:
7 years, 6 months ago
Reviewers:
miket_OOO, Nico, dcheng
CC:
chromium-reviews
Visibility:
Public.

Description

Continue bitmap fetching for notifications. This continues the bitmap fetching for notifications feature by adding the actual bitmap URL fetching and decoding. This checkin adds a new class, NotificationBitmapFetcher, which is responsible for fetching the URL of the bitmap to get the bitmap bits, and decoding them into an SkBitmap for eventual passing to the Rich Notifications system. Along with the class I add unit tests (for testing the synchronous parts) and browser tests (for testing the async parts) of the checkin. The current approach uses URLFetcher and ImageDecoder (on a different thread). The call flow is first to call the URLFetcher, and when it returns async, to call the ImageDecoder in a different process so that any bitmap decoding errors do not result in a security hole. BUG=241829 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203566

Patch Set 1 #

Patch Set 2 : Synced Notification bitmap fetching - implementation and tests #

Patch Set 3 : Synced Notifications Bitmap Fetching improve unit tests #

Total comments: 15

Patch Set 4 : Synced Notification Bitmap Fetching - Address DCheng CR feedback #

Total comments: 18

Patch Set 5 : Synced Notification Bitmap Fetching - refactor to use delegates instead of notifications #

Total comments: 52

Patch Set 6 : Synced Notification Bitmap Fetching - refactor unit tests into browser test #

Total comments: 22

Patch Set 7 : Synced Notification Bitmap Fetching - more DCheng feedback, change OnURLFetchCompelte test to a Sta… #

Total comments: 6

Patch Set 8 : Synced Notification Bitmap Fetching - more DCheng feedback, change TestURLFetcher to FakeURLFetcher… #

Total comments: 23

Patch Set 9 : Synced Notification Bitmap Fetching - DCheng and MikeT feedback, make NotificationBitmapFetcher no … #

Total comments: 7

Patch Set 10 : Synced Notification Bitmap Fetching - minor CR feedback, added message loops for browser tests. #

Patch Set 11 : Synced Notifications Bitmap Fetching - fix case of include file name. #

Patch Set 12 : Synced Notification Bitmap Fetching - fix another case sensitive filename #

Patch Set 13 : Synced Notification Bitmap Fetching - Linux Compile Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -0 lines) Patch
A chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +81 lines, -0 lines 0 comments Download
A chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc View 1 2 3 4 5 6 7 8 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +175 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Pete Williamson
Reviewers: Look for TODO(reviewers) for a few questions on the proper approach as I am ...
7 years, 7 months ago (2013-05-21 18:28:54 UTC) #1
dcheng
https://codereview.chromium.org/15295018/diff/6001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc (right): https://codereview.chromium.org/15295018/diff/6001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode16 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc:16: GURL& url, url doesn't seem to be used. https://codereview.chromium.org/15295018/diff/6001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode18 ...
7 years, 7 months ago (2013-05-22 19:38:35 UTC) #2
Dmitry Titov
I'd mostly echo Daniel's feedback, so I'll remove myself from the list now... His nod ...
7 years, 7 months ago (2013-05-22 22:25:13 UTC) #3
Dmitry Titov
I'd mostly echo Daniel's feedback, so I'll remove myself from the list now... His nod ...
7 years, 7 months ago (2013-05-22 22:25:13 UTC) #4
Pete Williamson
Address DCheng CR feedback. I also added back the DCHECK for correct threading in the ...
7 years, 7 months ago (2013-05-23 16:47:29 UTC) #5
dcheng
https://codereview.chromium.org/15295018/diff/6001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc (right): https://codereview.chromium.org/15295018/diff/6001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode91 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc:91: // TODO(reviewers): what is the proper thread to use? ...
7 years, 7 months ago (2013-05-23 19:32:25 UTC) #6
Pete Williamson
Refactored to use delegates instead of notification observers as requested by DCheng. As part of ...
7 years, 7 months ago (2013-05-24 22:18:06 UTC) #7
dcheng
https://codereview.chromium.org/15295018/diff/22001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc (right): https://codereview.chromium.org/15295018/diff/22001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode7 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc:7: #include "chrome/common/chrome_notification_types.h" Nit: None of the content notification headers ...
7 years, 6 months ago (2013-05-28 20:11:34 UTC) #8
Pete Williamson
Addressed DCheng feedback. I've replaced the "success" parameter in the callback with a "URL" parameter ...
7 years, 6 months ago (2013-05-29 18:05:00 UTC) #9
dcheng
> I've replaced the "success" parameter in the callback with a "URL" parameter > when ...
7 years, 6 months ago (2013-05-29 20:40:29 UTC) #10
Pete Williamson
More CR feedback and answers for DCheng. I removed the URL parameter from the callback, ...
7 years, 6 months ago (2013-05-30 00:13:18 UTC) #11
dcheng
https://codereview.chromium.org/15295018/diff/22001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc (right): https://codereview.chromium.org/15295018/diff/22001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode75 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc:75: bitmap_.reset(new SkBitmap()); On 2013/05/30 00:13:18, Pete Williamson wrote: > ...
7 years, 6 months ago (2013-05-30 00:38:13 UTC) #12
Pete Williamson
More CR changes per DCheng. Primary change is to make the tests go through the ...
7 years, 6 months ago (2013-05-30 22:22:17 UTC) #13
dcheng
https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc (right): https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc#newcode20 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.cc:20: if (url_fetcher_ == NULL) Style nit: Use {}s since ...
7 years, 6 months ago (2013-05-30 22:38:09 UTC) #14
miket_OOO
Good tests! LGTM. https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h (right): https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h#newcode36 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher.h:36: explicit NotificationBitmapFetcher( This doesn't need to ...
7 years, 6 months ago (2013-05-30 22:53:19 UTC) #15
Pete Williamson
Nico: Please do owners review of the .gypi files. DCheng and MikeT, this should address ...
7 years, 6 months ago (2013-05-31 00:17:39 UTC) #16
dcheng
https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc (right): https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc#newcode35 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc:35: explicit NotificationBitmapFetcherTestDelegate(bool async) On 2013/05/31 00:17:39, Pete Williamson wrote: ...
7 years, 6 months ago (2013-05-31 00:27:37 UTC) #17
Pete Williamson
Nico@ Need owners review of the .gypi files. Answers for DCheng (the fixes are minor, ...
7 years, 6 months ago (2013-05-31 01:01:44 UTC) #18
dcheng
https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc (right): https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc#newcode35 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc:35: explicit NotificationBitmapFetcherTestDelegate(bool async) On 2013/05/31 01:01:44, Pete Williamson wrote: ...
7 years, 6 months ago (2013-05-31 02:34:51 UTC) #19
Pete Williamson
Answers and changes per DCheng. https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc (right): https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc#newcode35 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc:35: explicit NotificationBitmapFetcherTestDelegate(bool async) On ...
7 years, 6 months ago (2013-05-31 16:42:20 UTC) #20
Dmitry Titov
On 2013/05/31 00:27:37, dcheng wrote: > https://codereview.chromium.org/15295018/diff/44001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc > File > chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc > (right): > > ...
7 years, 6 months ago (2013-05-31 17:34:11 UTC) #21
dcheng
lgtm https://codereview.chromium.org/15295018/diff/52001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc File chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc (right): https://codereview.chromium.org/15295018/diff/52001/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc#newcode161 chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc:161: On 2013/05/31 16:42:20, Pete Williamson wrote: > On ...
7 years, 6 months ago (2013-05-31 17:36:04 UTC) #22
Pete Williamson
ping thakis@ - We still need OWNERS review of the .gypi files. Thanks!
7 years, 6 months ago (2013-05-31 17:39:40 UTC) #23
Nico
gypi lgtm. It's fine to TBR gypi changes like this, see comment in chrome/OWNERS. (Sorry ...
7 years, 6 months ago (2013-05-31 20:46:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/15295018/58001
7 years, 6 months ago (2013-05-31 21:00:00 UTC) #25
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-31 21:24:22 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/15295018/74005
7 years, 6 months ago (2013-05-31 21:59:17 UTC) #27
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-05-31 22:24:03 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/15295018/80001
7 years, 6 months ago (2013-05-31 23:48:00 UTC) #29
commit-bot: I haz the power
7 years, 6 months ago (2013-06-01 04:21:37 UTC) #30
Message was sent while issue was closed.
Change committed as 203566

Powered by Google App Engine
This is Rietveld 408576698