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

Issue 2149453004: Implement first version of OfflinePageSuggestionsProvider (Closed)

Created:
4 years, 5 months ago by Philipp Keck
Modified:
4 years, 5 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, droger+watchlist_chromium.org, romax+watch_chromium.org, blundell+watchlist_chromium.org, dewittj+watch_chromium.org, sdefresne+watchlist_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, rginda+watch_chromium.org, arv+watch_chromium.org, asvitkine+watch_chromium.org, fgorski+watch_chromium.org, dimich+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement first version of OfflinePageSuggestionsProvider Implement a ContentSuggestionsProvider that reads from the OfflinePageModel, converts to ContentSuggestions and provides those to the ContentSuggestionsService. Add a chrome-flag to enable the provider and implement a factory that registers the provider with the service. The implementation is not usable by users, yet, because extraction of title, snippet text and image is not implemented. Those fields are filled with dummy data or left empty. Deduplication, sorting and discarding are also not implemented. But the OfflinePageSuggestionsProvider serves as an example for other ContentSuggestionsProvider implementations and it can be used to test multiple-section UI implementations. BUG=628198 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/5044dec1802c333acca98268df660ccee3ddbd8d Cr-Commit-Position: refs/heads/master@{#406028}

Patch Set 1 #

Total comments: 47

Patch Set 2 : Move the factory to c/b/android/ntp and Marc's comments #

Total comments: 19

Patch Set 3 : Marc's new comments #

Patch Set 4 : Small fixes #

Total comments: 20

Patch Set 5 : Marc's, Justin's and Bernhard's comments #

Total comments: 2

Patch Set 6 : Remove separate build target for offline_page_suggestions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+393 lines, -35 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_feature_list.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/chrome_feature_list.cc View 1 2 3 4 2 chunks +22 lines, -27 lines 0 comments Download
A chrome/browser/android/ntp/offline_page_suggestions_provider_factory.h View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/android/ntp/offline_page_suggestions_provider_factory.cc View 1 2 1 chunk +75 lines, -0 lines 0 comments Download
M chrome/browser/ntp_snippets/content_suggestions_service_factory.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ntp_snippets/ntp_snippets_service_factory.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/snippets_internals.html View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M components/ntp_snippets.gypi View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M components/ntp_snippets/content_suggestions_category.h View 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_snippets/ntp_snippets_service.h View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A components/ntp_snippets/offline_pages/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
A components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h View 1 2 3 4 1 chunk +79 lines, -0 lines 0 comments Download
A components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc View 1 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
M components/offline_pages/background/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (10 generated)
Philipp Keck
PTAL
4 years, 5 months ago (2016-07-14 11:41:24 UTC) #3
Philipp Keck
dewittj@chromium.org: Please review changes in components/offline_pages/background/BUILD.gn and please also have a look at the changes ...
4 years, 5 months ago (2016-07-14 11:44:17 UTC) #5
Marc Treib
Early comments: - I think the Offline Pages integration deserves a separate bug from the ...
4 years, 5 months ago (2016-07-14 11:50:47 UTC) #6
Marc Treib
Mostly looks good! https://codereview.chromium.org/2149453004/diff/1/chrome/browser/android/chrome_feature_list.cc File chrome/browser/android/chrome_feature_list.cc (right): https://codereview.chromium.org/2149453004/diff/1/chrome/browser/android/chrome_feature_list.cc#newcode66 chrome/browser/android/chrome_feature_list.cc:66: "NTPOfflinePageSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; nit: this is formatted ...
4 years, 5 months ago (2016-07-14 12:16:54 UTC) #8
Philipp Keck
On 2016/07/14 11:50:47, Marc Treib wrote: > Early comments: > - I think the Offline ...
4 years, 5 months ago (2016-07-14 12:28:20 UTC) #9
Marc Treib
On 2016/07/14 12:28:20, Philipp Keck wrote: > On 2016/07/14 11:50:47, Marc Treib wrote: > > ...
4 years, 5 months ago (2016-07-14 12:32:50 UTC) #10
Philipp Keck
> > > - Have you tried building this on non-Android platforms? All the offline ...
4 years, 5 months ago (2016-07-14 13:46:03 UTC) #12
Marc Treib
https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets/offline_pages/BUILD.gn File components/ntp_snippets/offline_pages/BUILD.gn (right): https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets/offline_pages/BUILD.gn#newcode7 components/ntp_snippets/offline_pages/BUILD.gn:7: import("//build/config/android/rules.gni") On 2016/07/14 13:46:02, Philipp Keck wrote: > On ...
4 years, 5 months ago (2016-07-14 14:17:24 UTC) #13
Philipp Keck
https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets/offline_pages/BUILD.gn File components/ntp_snippets/offline_pages/BUILD.gn (right): https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets/offline_pages/BUILD.gn#newcode7 components/ntp_snippets/offline_pages/BUILD.gn:7: import("//build/config/android/rules.gni") On 2016/07/14 14:17:23, Marc Treib wrote: > On ...
4 years, 5 months ago (2016-07-14 15:30:06 UTC) #14
Marc Treib
lgtm https://codereview.chromium.org/2149453004/diff/1/chrome/browser/android/chrome_feature_list.cc File chrome/browser/android/chrome_feature_list.cc (right): https://codereview.chromium.org/2149453004/diff/1/chrome/browser/android/chrome_feature_list.cc#newcode66 chrome/browser/android/chrome_feature_list.cc:66: "NTPOfflinePageSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; On 2016/07/14 13:46:02, Philipp Keck wrote: ...
4 years, 5 months ago (2016-07-14 16:13:17 UTC) #15
dewittj
https://codereview.chromium.org/2149453004/diff/50001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc (right): https://codereview.chromium.org/2149453004/diff/50001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode60 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:60: // TODO(pke): Implement Nit: Implement. https://codereview.chromium.org/2149453004/diff/50001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode64 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:64: // Ignore ...
4 years, 5 months ago (2016-07-14 18:13:29 UTC) #16
Bernhard Bauer
https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi File components/ntp_snippets.gypi (right): https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi#newcode71 components/ntp_snippets.gypi:71: '../..', On 2016/07/14 16:13:16, Marc Treib wrote: > On ...
4 years, 5 months ago (2016-07-14 18:47:44 UTC) #17
Philipp Keck
Thank you Bernhard, Justin and Marc! Corrected almost all of the things you commented on. ...
4 years, 5 months ago (2016-07-15 09:08:42 UTC) #18
Philipp Keck
thakis@chromium.org: Please review changes in chrome/browser/profiles/profile_manager.cc and chrome/browser/BUILD.gn Thank you!
4 years, 5 months ago (2016-07-15 11:29:28 UTC) #20
Nico
lgtm
4 years, 5 months ago (2016-07-15 17:47:21 UTC) #21
Philipp Keck
dewittj@chromium.org: Please review changes in components/offline_pages/background/BUILD.gn (need your approval for this file)
4 years, 5 months ago (2016-07-18 10:21:14 UTC) #22
Bernhard Bauer
https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi File components/ntp_snippets.gypi (right): https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi#newcode71 components/ntp_snippets.gypi:71: '../..', On 2016/07/15 09:08:41, Philipp Keck wrote: > On ...
4 years, 5 months ago (2016-07-18 11:09:33 UTC) #23
Philipp Keck
https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi File components/ntp_snippets.gypi (right): https://codereview.chromium.org/2149453004/diff/1/components/ntp_snippets.gypi#newcode71 components/ntp_snippets.gypi:71: '../..', On 2016/07/18 11:09:32, Bernhard Bauer wrote: > On ...
4 years, 5 months ago (2016-07-18 12:55:03 UTC) #25
dewittj
lgtm
4 years, 5 months ago (2016-07-18 14:52:16 UTC) #26
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/2149453004/90001
4 years, 5 months ago (2016-07-18 14:55:03 UTC) #29
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-18 14:55:06 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:90001)
4 years, 5 months ago (2016-07-18 17:40:34 UTC) #31
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 17:40:51 UTC) #32
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 17:42:14 UTC) #34
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/5044dec1802c333acca98268df660ccee3ddbd8d
Cr-Commit-Position: refs/heads/master@{#406028}

Powered by Google App Engine
This is Rietveld 408576698