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

Issue 1159363002: [Download Notification] Show preview if downloaded file is image (Closed)

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

Description

[Download Notification] Show preview if downloaded file is image This patch adds a preview to completion notification if the downloaded file is an png or jepg image. BUG=468561 TEST=unit_tests and browser_tests pass Committed: https://crrev.com/8719742f50d58e17c81fdf2fd427f3a2fbb847e9 Cr-Commit-Position: refs/heads/master@{#335023}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Replace DCHECK(CurrentlyON(...)) -> DCHECK_CURRENTLY_ON(...) #

Patch Set 3 : Use ImageLoader #

Total comments: 10

Patch Set 4 : Adressed comment #10 #

Total comments: 14

Patch Set 5 : Addressed comments #12 #

Total comments: 1

Patch Set 6 : Read file content in the browser process #

Total comments: 17

Patch Set 7 : Addressed comments #27 #

Total comments: 2

Patch Set 8 : Addressed comment #31 #

Total comments: 2

Patch Set 9 : . #

Total comments: 3

Patch Set 10 : Addressed comments #41 #

Total comments: 10

Patch Set 11 : Addressed comment #44 and #45 #

Patch Set 12 : rebase & use embedded server #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -13 lines) Patch
M chrome/browser/download/notification/download_notification_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/download/notification/download_notification_item.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +21 lines, -2 lines 0 comments Download
M chrome/browser/download/notification/download_notification_item.cc View 1 2 3 4 5 6 7 8 9 10 11 14 chunks +97 lines, -12 lines 0 comments Download
M chrome/browser/download/notification/download_notification_item_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -0 lines 0 comments Download
A + chrome/test/data/downloads/image-octet-stream.png View Binary file 0 comments Download
A + chrome/test/data/downloads/image-octet-stream.png.mock-http-headers View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 51 (17 generated)
yoshiki
Asanka, could you take a look? Thanks.
5 years, 6 months ago (2015-06-01 17:29:39 UTC) #3
asanka
This is a nice feature, but we generally go out of our way not to ...
5 years, 6 months ago (2015-06-03 03:02:04 UTC) #6
yoshiki
I agree that avoiding potential security vulnerability is generally better. I assume other image decoding ...
5 years, 6 months ago (2015-06-04 04:13:22 UTC) #7
asanka
On 2015/06/04 at 04:13:22, yoshiki wrote: > I agree that avoiding potential security vulnerability is ...
5 years, 6 months ago (2015-06-04 15:48:16 UTC) #8
yoshiki
> Favicons are special since they tend to have an associated web_contents(). > Favicon decoded ...
5 years, 6 months ago (2015-06-08 17:51:05 UTC) #9
asanka
https://codereview.chromium.org/1159363002/diff/100001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/100001/chrome/browser/download/notification/download_notification_item.cc#newcode54 chrome/browser/download/notification/download_notification_item.cc:54: if (data.size() > kMaxImagePreviewSize) Check the size of the ...
5 years, 6 months ago (2015-06-09 00:13:38 UTC) #10
yoshiki
Asanka, PTAL. Thanks. https://codereview.chromium.org/1159363002/diff/100001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/100001/chrome/browser/download/notification/download_notification_item.cc#newcode54 chrome/browser/download/notification/download_notification_item.cc:54: if (data.size() > kMaxImagePreviewSize) On 2015/06/09 ...
5 years, 6 months ago (2015-06-10 15:05:04 UTC) #11
asanka
Getting close. Thanks! And sorry about the delay in review. You should add a suitable ...
5 years, 6 months ago (2015-06-11 03:30:52 UTC) #12
yoshiki
Asanka, PTAL at the while code? Greg, PTAL at changes in ImageDecoder and ChromeContentUtilityClienty? Thanks. ...
5 years, 6 months ago (2015-06-11 08:22:09 UTC) #16
asanka
/download/ lgtm https://codereview.chromium.org/1159363002/diff/180001/chrome/browser/download/notification/download_notification_browsertest.cc File chrome/browser/download/notification/download_notification_browsertest.cc (right): https://codereview.chromium.org/1159363002/diff/180001/chrome/browser/download/notification/download_notification_browsertest.cc#newcode504 chrome/browser/download/notification/download_notification_browsertest.cc:504: IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DownloadImageFile) { In addition, we'd need ...
5 years, 6 months ago (2015-06-11 15:46:43 UTC) #17
Greg Levin
Hi Yoshiki. Seems okay as far as I can tell, but since I'm not an ...
5 years, 6 months ago (2015-06-11 16:03:45 UTC) #18
yoshiki
Greg, Thanks you for your comment. I asked review because you have originally introduced this ...
5 years, 6 months ago (2015-06-12 01:33:15 UTC) #21
Lei Zhang
On 2015/06/12 01:33:15, yoshiki wrote: > Greg, Thanks you for your comment. I asked review ...
5 years, 6 months ago (2015-06-12 01:47:16 UTC) #22
yoshiki
On 2015/06/12 01:47:16, Lei Zhang wrote: > On 2015/06/12 01:33:15, yoshiki wrote: > > Greg, ...
5 years, 6 months ago (2015-06-12 02:43:22 UTC) #23
Lei Zhang
On 2015/06/12 02:43:22, yoshiki wrote: > And I have a question. Later, I'm planning to ...
5 years, 6 months ago (2015-06-12 04:12:03 UTC) #24
yoshiki
On 2015/06/12 04:12:03, Lei Zhang wrote: > On 2015/06/12 02:43:22, yoshiki wrote: > > And ...
5 years, 6 months ago (2015-06-12 04:14:32 UTC) #25
yoshiki
On 2015/06/12 04:14:32, yoshiki wrote: > On 2015/06/12 04:12:03, Lei Zhang wrote: > > On ...
5 years, 6 months ago (2015-06-12 05:45:58 UTC) #26
Lei Zhang
https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc#newcode43 chrome/browser/download/notification/download_notification_item.cc:43: std::string ReadNotificationImage(const base::FilePath file_path) { const ref. https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc#newcode46 chrome/browser/download/notification/download_notification_item.cc:46: ...
5 years, 6 months ago (2015-06-12 07:26:37 UTC) #27
yoshiki
Thanks. PTAL. https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc#newcode43 chrome/browser/download/notification/download_notification_item.cc:43: std::string ReadNotificationImage(const base::FilePath file_path) { On 2015/06/12 ...
5 years, 6 months ago (2015-06-12 08:00:20 UTC) #28
asanka
On 2015/06/12 at 01:47:16, thestig wrote: > On 2015/06/12 01:33:15, yoshiki wrote: > > Greg, ...
5 years, 6 months ago (2015-06-12 15:21:35 UTC) #29
Greg Levin
I'll pipe in here with my tiny bit of knowledge, since it seems relevant. My ...
5 years, 6 months ago (2015-06-12 16:37:09 UTC) #30
Lei Zhang
https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc#newcode375 chrome/browser/download/notification/download_notification_item.cc:375: content::BrowserThread::FILE, On 2015/06/12 08:00:20, yoshiki wrote: > On 2015/06/12 ...
5 years, 6 months ago (2015-06-13 00:27:26 UTC) #31
Lei Zhang
On 2015/06/12 15:21:35, asanka wrote: > Hi Lei, > > The expected result of the ...
5 years, 6 months ago (2015-06-13 01:50:29 UTC) #32
asanka
On 2015/06/13 at 01:50:29, thestig wrote: > On 2015/06/12 15:21:35, asanka wrote: > > Hi ...
5 years, 6 months ago (2015-06-13 04:06:23 UTC) #33
yoshiki
On 2015/06/13 04:06:23, asanka wrote: > On 2015/06/13 at 01:50:29, thestig wrote: > > On ...
5 years, 6 months ago (2015-06-15 04:51:02 UTC) #34
Lei Zhang
If this is ChromeOS only, are we doing extra work on other platforms? Or are ...
5 years, 6 months ago (2015-06-15 21:30:58 UTC) #39
asanka
https://codereview.chromium.org/1159363002/diff/340001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/340001/chrome/browser/download/notification/download_notification_item.cc#newcode365 chrome/browser/download/notification/download_notification_item.cc:365: std::string extension_with_dot = base::FilePath::StringType https://codereview.chromium.org/1159363002/diff/340001/chrome/browser/download/notification/download_notification_item_unittest.cc File chrome/browser/download/notification/download_notification_item_unittest.cc (right): https://codereview.chromium.org/1159363002/diff/340001/chrome/browser/download/notification/download_notification_item_unittest.cc#newcode106 ...
5 years, 6 months ago (2015-06-16 15:10:20 UTC) #41
yoshiki
https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc File chrome/browser/download/notification/download_notification_item.cc (right): https://codereview.chromium.org/1159363002/diff/200001/chrome/browser/download/notification/download_notification_item.cc#newcode375 chrome/browser/download/notification/download_notification_item.cc:375: content::BrowserThread::FILE, On 2015/06/13 00:27:26, Lei Zhang wrote: > On ...
5 years, 6 months ago (2015-06-16 16:41:42 UTC) #43
Lei Zhang
lgtm with asanka's approval. https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_item_unittest.cc File chrome/browser/download/notification/download_notification_item_unittest.cc (right): https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_item_unittest.cc#newcode25 chrome/browser/download/notification/download_notification_item_unittest.cc:25: using testing::ReturnRef; nit: no longer ...
5 years, 6 months ago (2015-06-16 18:35:08 UTC) #44
asanka
lgtm % nits and browsertest update to use embedded_test_server(). https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_browsertest.cc File chrome/browser/download/notification/download_notification_browsertest.cc (right): https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_browsertest.cc#newcode505 chrome/browser/download/notification/download_notification_browsertest.cc:505: ...
5 years, 6 months ago (2015-06-17 14:35:30 UTC) #45
yoshiki
Thank you for long reviewing! https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_browsertest.cc File chrome/browser/download/notification/download_notification_browsertest.cc (right): https://codereview.chromium.org/1159363002/diff/400001/chrome/browser/download/notification/download_notification_browsertest.cc#newcode505 chrome/browser/download/notification/download_notification_browsertest.cc:505: ASSERT_TRUE(test_server()->Start()); On 2015/06/17 14:35:30, ...
5 years, 6 months ago (2015-06-18 10:48:04 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159363002/440001
5 years, 6 months ago (2015-06-18 10:49:18 UTC) #49
commit-bot: I haz the power
Committed patchset #12 (id:440001)
5 years, 6 months ago (2015-06-18 12:59:26 UTC) #50
commit-bot: I haz the power
5 years, 6 months ago (2015-06-18 13:00:15 UTC) #51
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/8719742f50d58e17c81fdf2fd427f3a2fbb847e9
Cr-Commit-Position: refs/heads/master@{#335023}

Powered by Google App Engine
This is Rietveld 408576698