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

Issue 2360263002: [NTPSnippets] Show all downloads on the NTP (3/3): Downloads provider. (Closed)

Created:
4 years, 3 months ago by vitaliii
Modified:
4 years, 1 month ago
CC:
chromium-reviews, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTPSnippets] Show all downloads on the NTP (3/3): Downloads provider. This CL is the third of the three CLs. The overall aim is to show all types of downloads on the NTP in downloads section. This CL adds DownloadSuggestionsProvider, which provides both offline page (e.g. offlined pages) and asset (e.g. images) downloads. If any of the two previous CLs is reverted, this CL must be reverted too. BUG=639233 Committed: https://crrev.com/dbedcae7e3c81448f3fc57f1493263087d2eb1b1 Cr-Commit-Position: refs/heads/master@{#429194}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Marc's comments. #

Total comments: 132

Patch Set 3 : Marc's comments + tests + some corrections. #

Total comments: 60

Patch Set 4 : Marc's comments + rebase + improvements + more tests. #

Patch Set 5 : fix for win. #

Patch Set 6 : another win fix. #

Total comments: 46

Patch Set 7 : rebase + Marc's comments. #

Total comments: 26

Patch Set 8 : Marc's comments + Bernhard's comments + rebase. #

Total comments: 4

Patch Set 9 : rebase. #

Patch Set 10 : more verbose error message. #

Patch Set 11 : rebase + more debug output. #

Patch Set 12 : more debug output. #

Patch Set 13 : debug. #

Patch Set 14 : removed my strings #

Patch Set 15 : more debug (cmp strings). #

Patch Set 16 : debug (output all strings). #

Patch Set 17 : debug (reverted component string back). #

Patch Set 18 : restored predebug implementation, debug output remains. #

Patch Set 19 : dgn@ & bauerb@ comments + removed debug output + rebase. #

Total comments: 5

Patch Set 20 : fixed some comments. #

Patch Set 21 : rebase. #

Patch Set 22 : the freshest rebase. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2317 lines, -45 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/preferences/browser_prefs_android.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
A + chrome/browser/ntp_snippets/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 1 2 3 4 5 6 7 4 chunks +25 lines, -2 lines 0 comments Download
A chrome/browser/ntp_snippets/download_suggestions_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +225 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/download_suggestions_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +629 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +768 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/fake_download_item.h View 1 2 3 4 5 6 7 1 chunk +138 lines, -0 lines 0 comments Download
A chrome/browser/ntp_snippets/fake_download_item.cc View 1 2 3 1 chunk +378 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 2 3 4 5 6 3 chunks +19 lines, -2 lines 0 comments Download
A components/ntp_snippets/offline_pages/offline_pages_test_utils.h View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 0 comments Download
A components/ntp_snippets/offline_pages/offline_pages_test_utils.cc View 1 2 3 4 5 1 chunk +57 lines, -0 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc View 1 2 4 chunks +4 lines, -33 lines 0 comments Download
M components/ntp_snippets/pref_names.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/pref_names.cc View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M components/ntp_snippets_strings.grdp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -2 lines 1 comment Download

Messages

Total messages: 125 (99 generated)
vitaliii
Hi Marc, could you have a look?
4 years, 3 months ago (2016-09-22 13:29:04 UTC) #3
vitaliii
Added an important comment. https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/downloads/download_suggestions_provider.cc File components/ntp_snippets/downloads/download_suggestions_provider.cc (right): https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/downloads/download_suggestions_provider.cc#newcode270 components/ntp_snippets/downloads/download_suggestions_provider.cc:270: FetchAssetsDownloads(); Since this is called ...
4 years, 3 months ago (2016-09-22 13:43:17 UTC) #4
Marc Treib
Sending comments early: I haven't actually looked at the new Provider yet, but there's a ...
4 years, 3 months ago (2016-09-22 13:45:52 UTC) #5
vitaliii
Hi Marc, would you mind having a rough look before I proceed with the tests? ...
4 years, 2 months ago (2016-10-11 08:15:56 UTC) #6
Marc Treib
https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/offline_pages/DEPS File components/ntp_snippets/offline_pages/DEPS (right): https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/offline_pages/DEPS#newcode2 components/ntp_snippets/offline_pages/DEPS:2: "+components/offline_pages", On 2016/10/11 08:15:56, vitaliii wrote: > On 2016/09/22 ...
4 years, 2 months ago (2016-10-11 12:07:42 UTC) #7
vitaliii
Hi Marc, would you mind having a look? https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/offline_pages/DEPS File components/ntp_snippets/offline_pages/DEPS (right): https://codereview.chromium.org/2360263002/diff/20001/components/ntp_snippets/offline_pages/DEPS#newcode2 components/ntp_snippets/offline_pages/DEPS:2: "+components/offline_pages", ...
4 years, 2 months ago (2016-10-13 08:43:07 UTC) #8
Marc Treib
https://codereview.chromium.org/2360263002/diff/40001/chrome/browser/ntp_snippets/downloads/DEPS File chrome/browser/ntp_snippets/downloads/DEPS (right): https://codereview.chromium.org/2360263002/diff/40001/chrome/browser/ntp_snippets/downloads/DEPS#newcode2 chrome/browser/ntp_snippets/downloads/DEPS:2: "+grit/components_strings.h", On 2016/10/13 08:43:04, vitaliii wrote: > On 2016/10/11 ...
4 years, 2 months ago (2016-10-13 12:11:27 UTC) #9
vitaliii
Hi Marc, could you have a look? https://codereview.chromium.org/2360263002/diff/40001/chrome/browser/ntp_snippets/downloads/DEPS File chrome/browser/ntp_snippets/downloads/DEPS (right): https://codereview.chromium.org/2360263002/diff/40001/chrome/browser/ntp_snippets/downloads/DEPS#newcode2 chrome/browser/ntp_snippets/downloads/DEPS:2: "+grit/components_strings.h", On ...
4 years, 2 months ago (2016-10-15 18:36:31 UTC) #43
Marc Treib
Nice! A few more comments, mostly nits. https://codereview.chromium.org/2360263002/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2360263002/diff/60001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode73 chrome/browser/ntp_snippets/download_suggestions_provider.cc:73: DCHECK((client_id.name_space == ...
4 years, 2 months ago (2016-10-17 10:18:42 UTC) #44
vitaliii
Hello Marc, could you have a look? In case there is not much to improve ...
4 years, 1 month ago (2016-10-26 00:07:56 UTC) #47
Marc Treib
lgtm Thanks! Looks good :) https://codereview.chromium.org/2360263002/diff/180001/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc File chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc (right): https://codereview.chromium.org/2360263002/diff/180001/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc#newcode406 chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc:406: EXPECT_CALL(*observer(), On 2016/10/26 00:07:55, ...
4 years, 1 month ago (2016-10-26 08:54:09 UTC) #50
Marc Treib
+bauerb for browser_prefs.cc. PTAL!
4 years, 1 month ago (2016-10-26 08:55:22 UTC) #52
Bernhard Bauer
https://codereview.chromium.org/2360263002/diff/200001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2360263002/diff/200001/chrome/app/generated_resources.grd#newcode450 chrome/app/generated_resources.grd:450: + <message name="IDS_NTP_DOWNLOAD_SUGGESTIONS_SECTION_HEADER" desc="Header of the downloads section, which ...
4 years, 1 month ago (2016-10-26 10:19:33 UTC) #53
dgn
https://codereview.chromium.org/2360263002/diff/220001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2360263002/diff/220001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode135 chrome/browser/ntp_snippets/download_suggestions_provider.cc:135: /*has_more_button=*/download_manager_ui_enabled_, We now always show the button, and this ...
4 years, 1 month ago (2016-10-27 15:35:33 UTC) #71
vitaliii
Hey Bernhard, could you have a look? I will investigate the bot later. https://codereview.chromium.org/2360263002/diff/180001/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc File ...
4 years, 1 month ago (2016-10-27 15:49:20 UTC) #72
Bernhard Bauer
LGTM with two small things that would be nice: https://codereview.chromium.org/2360263002/diff/200001/chrome/browser/ntp_snippets/download_suggestions_provider.cc File chrome/browser/ntp_snippets/download_suggestions_provider.cc (right): https://codereview.chromium.org/2360263002/diff/200001/chrome/browser/ntp_snippets/download_suggestions_provider.cc#newcode392 chrome/browser/ntp_snippets/download_suggestions_provider.cc:392: ...
4 years, 1 month ago (2016-10-27 15:57:09 UTC) #73
vitaliii
Hi Marc, could you please have another look? Keep in mind that I did some ...
4 years, 1 month ago (2016-11-01 03:09:54 UTC) #104
dgn
https://codereview.chromium.org/2360263002/diff/530001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right): https://codereview.chromium.org/2360263002/diff/530001/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc#newcode285 chrome/browser/ntp_snippets/content_suggestions_service_factory.cc:285: if (base::FeatureList::IsEnabled(ntp_snippets::kDownloadSuggestionsFeature)) { Shouldn't this flag move to //chrome ...
4 years, 1 month ago (2016-11-01 11:05:18 UTC) #107
vitaliii
I am going to submit the CL with the dummy string, because 1) the ios-simulator ...
4 years, 1 month ago (2016-11-02 00:47:37 UTC) #111
vitaliii
Also I am not waiting for another LGTM, because the reviewers are not available until ...
4 years, 1 month ago (2016-11-02 00:49:50 UTC) #112
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2360263002/590001
4 years, 1 month ago (2016-11-02 01:28:28 UTC) #116
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/294628)
4 years, 1 month ago (2016-11-02 01:34:12 UTC) #118
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2360263002/620001
4 years, 1 month ago (2016-11-02 01:51:11 UTC) #121
commit-bot: I haz the power
Committed patchset #22 (id:620001)
4 years, 1 month ago (2016-11-02 03:00:53 UTC) #122
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/dbedcae7e3c81448f3fc57f1493263087d2eb1b1 Cr-Commit-Position: refs/heads/master@{#429194}
4 years, 1 month ago (2016-11-02 03:02:51 UTC) #124
Marc Treib
4 years, 1 month ago (2016-11-07 13:14:40 UTC) #125
Message was sent while issue was closed.
https://codereview.chromium.org/2360263002/diff/530001/chrome/browser/ntp_sni...
File chrome/browser/ntp_snippets/content_suggestions_service_factory.cc (right):

https://codereview.chromium.org/2360263002/diff/530001/chrome/browser/ntp_sni...
chrome/browser/ntp_snippets/content_suggestions_service_factory.cc:285: if
(base::FeatureList::IsEnabled(ntp_snippets::kDownloadSuggestionsFeature)) {
On 2016/11/02 00:47:37, vitaliii wrote:
> On 2016/11/01 11:05:18, dgn wrote:
> > Shouldn't this flag move to //chrome too, since it's not used for anything
in
> > //components?
> 
> I am not sure about this. We had to move the provider and its strings to
/chrome
> due to dependency on the download manager, however, we do not have to move
> remaining things and keeping them together with other NTP things looks neat to
> me. 
> Thus, as we discussed privately, I will proceed as it is and then we may do
the
> move in the following CL.

Hm. I'd say the flag should be next to the code that uses it (but it's not a
huge deal).

https://codereview.chromium.org/2360263002/diff/620001/components/ntp_snippet...
File components/ntp_snippets_strings.grdp (right):

https://codereview.chromium.org/2360263002/diff/620001/components/ntp_snippet...
components/ntp_snippets_strings.grdp:28: <!-- TODO(vitaliii): Remove this item
when crbug.com/660343 is resolved. -->
That bug has been marked "fixed", can you try if the problem still exists?

Powered by Google App Engine
This is Rietveld 408576698