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

Issue 2473483006: Adds a Fetch() method to the ContentSuggestionService which asks any provider to provide more conte… (Closed)

Created:
4 years, 1 month ago by tschumann
Modified:
4 years, 1 month ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds a Fetch() method to the ContentSuggestionService which asks any provider to provide more content for the chosen category. There is an implementation for the NtpSnippetsService. BUG=634892 Committed: https://crrev.com/83578aa7e1848253943204912238c0c74d0b9e84 Cr-Commit-Position: refs/heads/master@{#429554}

Patch Set 1 #

Total comments: 6

Patch Set 2 : comments by Markus. #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+528 lines, -106 lines) Patch
M chrome/browser/ntp_snippets/download_suggestions_provider.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ntp_snippets/download_suggestions_provider.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_provider.h View 3 chunks +11 lines, -0 lines 2 comments Download
M components/ntp_snippets/content_suggestions_service.h View 3 chunks +11 lines, -0 lines 2 comments Download
M components/ntp_snippets/content_suggestions_service.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service_unittest.cc View 2 chunks +14 lines, -0 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.h View 2 chunks +4 lines, -0 lines 0 comments Download
M components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.h View 4 chunks +6 lines, -6 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.cc View 1 5 chunks +30 lines, -7 lines 4 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher_unittest.cc View 14 chunks +90 lines, -17 lines 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_service.h View 1 7 chunks +42 lines, -3 lines 2 comments Download
M components/ntp_snippets/remote/ntp_snippets_service.cc View 1 9 chunks +172 lines, -72 lines 4 comments Download
M components/ntp_snippets/remote/ntp_snippets_service_unittest.cc View 1 4 chunks +75 lines, -1 line 0 comments Download
M components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.h View 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
tschumann
here it is, the one CL to rule em all. This is a patch of ...
4 years, 1 month ago (2016-11-03 11:06:16 UTC) #2
markusheintz_
On 2016/11/03 11:06:16, tschumann wrote: > here it is, the one CL to rule em ...
4 years, 1 month ago (2016-11-03 11:42:42 UTC) #5
markusheintz_
https://codereview.chromium.org/2473483006/diff/1/components/ntp_snippets/remote/ntp_snippets_fetcher.h File components/ntp_snippets/remote/ntp_snippets_fetcher.h (right): https://codereview.chromium.org/2473483006/diff/1/components/ntp_snippets/remote/ntp_snippets_fetcher.h#newcode229 components/ntp_snippets/remote/ntp_snippets_fetcher.h:229: void FilterCategories(FetchedCategoriesVector* categories); A comment would be nice that ...
4 years, 1 month ago (2016-11-03 11:43:54 UTC) #6
tschumann
https://codereview.chromium.org/2473483006/diff/1/components/ntp_snippets/remote/ntp_snippets_fetcher.h File components/ntp_snippets/remote/ntp_snippets_fetcher.h (right): https://codereview.chromium.org/2473483006/diff/1/components/ntp_snippets/remote/ntp_snippets_fetcher.h#newcode229 components/ntp_snippets/remote/ntp_snippets_fetcher.h:229: void FilterCategories(FetchedCategoriesVector* categories); On 2016/11/03 11:43:54, markusheintz_ wrote: > ...
4 years, 1 month ago (2016-11-03 11:55:47 UTC) #7
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/2473483006/20001
4 years, 1 month ago (2016-11-03 11:56:35 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-03 13:19:01 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/83578aa7e1848253943204912238c0c74d0b9e84 Cr-Commit-Position: refs/heads/master@{#429554}
4 years, 1 month ago (2016-11-03 13:22:24 UTC) #13
Marc Treib
Bunch of post-commit comments - mostly nits, but one which I think is an actual ...
4 years, 1 month ago (2016-11-07 14:28:24 UTC) #15
tschumann
4 years, 1 month ago (2016-11-08 16:57:35 UTC) #16
Message was sent while issue was closed.
follow-ups addressed in https://codereview.chromium.org/2485933003

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
File components/ntp_snippets/content_suggestions_provider.h (right):

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/content_suggestions_provider.h:112: FetchingCallback
callback) = 0;
On 2016/11/07 14:28:23, Marc Treib wrote:
> This should be a const&

Done.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
File components/ntp_snippets/content_suggestions_service.h (right):

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/content_suggestions_service.h:37: class
NTPSnippetsFetcher;
On 2016/11/07 14:28:23, Marc Treib wrote:
> Not needed

Done.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
File components/ntp_snippets/remote/ntp_snippets_fetcher.cc (right):

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/remote/ntp_snippets_fetcher.cc:755:
categories->erase(category_it + 1, categories->end());
On 2016/11/07 14:28:23, Marc Treib wrote:
> After looking at this for the 10th time, I'm now convinced that it's not only
> ugly, it also doesn't work :D
> The first erase() call will invalidate category_it (or at least "reinterpret"
> it), so the second erase() call will do either nothing or maybe
> unexpected/undefined things.

Good catch! I'll fix it.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/remote/ntp_snippets_fetcher.cc:767: // and filter here.
On 2016/11/07 14:28:23, Marc Treib wrote:
> I find this comment super confusing. In my version of the CL, I had changed it
> to:
> // Filter out unwanted categories if necessary.
> // TODO(fhorschig): As soon as the server supports filtering by
> // that instead of over-fetching and filtering here.

Done.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
File components/ntp_snippets/remote/ntp_snippets_service.cc (right):

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/remote/ntp_snippets_service.cc:316:
/*fetch_more=*/false, std::set<std::string>(),
On 2016/11/07 14:28:23, Marc Treib wrote:
> /*known_suggestion_ids=*/

changed in the meantime.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/remote/ntp_snippets_service.cc:646: // fetching_callback
On 2016/11/07 14:28:23, Marc Treib wrote:
> ?
 went away in the meantime.

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
File components/ntp_snippets/remote/ntp_snippets_service.h (right):

https://codereview.chromium.org/2473483006/diff/20001/components/ntp_snippets...
components/ntp_snippets/remote/ntp_snippets_service.h:366: CategoryContentMap
categories_;
On 2016/11/07 14:28:23, Marc Treib wrote:
> Why this change? CategoryContentMap isn't used anywhere else, so I'd prefer to
> leave out the typedef.

Done.

Powered by Google App Engine
This is Rietveld 408576698