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

Issue 2245583002: Split OfflinePageSuggestions into two categories (Closed)

Created:
4 years, 4 months ago by Philipp Keck
Modified:
4 years, 4 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, asvitkine+watch_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@offlinedismissed
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split OfflinePageSuggestions into two categories Add separate flags for enabling the recent tabs and downloads sections. Update flags shown on snippets-internals page. Modify the OfflinePageSuggestionsProvider to handle the two categories, especially to split the OfflinePageItems coming from the OfflinePageModel into two distinct lists ordered by the last accessed date. Use the title from the OfflinePageItem, if available; use the URL as a fallback otherwise. Add more-button actions for Recent Tabs and Downloads to open the respective native UIs. TBR=cpu@chromium.org (for generated_resources.grd) BUG=628198 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/c4fe8dd8b922142e6c3499369007688fd087bfcb Cr-Commit-Position: refs/heads/master@{#411645}

Patch Set 1 #

Total comments: 30

Patch Set 2 : Marc's comments #

Total comments: 8

Patch Set 3 : Remove const from StoreDismissedIDsToPrefs #

Patch Set 4 : Use the correct (temporary) condition for filtering out Downloads from the OfflinePageModel #

Patch Set 5 : Bernhard's comments #

Patch Set 6 : Use title from OfflinePageItem; URL only as fallback #

Patch Set 7 : Rebase on More-Button-Flag-CL #

Patch Set 8 : More-buttons for the Recent Tabs and Downloads sections #

Total comments: 3

Patch Set 9 : More-buttons for the Recent Tabs and Downloads sections (without the metric, coming back in new CL) #

Patch Set 10 : Remove more-button for Recent Tabs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -94 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionListItem.java View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -1 line 0 comments Download
M chrome/app/generated_resources.grd View 1 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/browser/about_flags.cc View 2 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -3 lines 0 comments Download
M chrome/browser/resources/snippets_internals.html View 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 chunk +8 lines, -3 lines 0 comments Download
M components/ntp_snippets/category.h View 1 chunk +5 lines, -2 lines 0 comments Download
M components/ntp_snippets/category_factory.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/content_suggestions_service_unittest.cc View 1 2 3 4 5 6 6 chunks +6 lines, -6 lines 0 comments Download
M components/ntp_snippets/features.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/features.cc View 1 chunk +4 lines, -1 line 0 comments Download
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h View 1 2 3 4 5 6 7 2 chunks +32 lines, -10 lines 0 comments Download
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc View 1 2 3 4 5 6 7 8 9 7 chunks +190 lines, -50 lines 0 comments Download
M components/ntp_snippets/pref_names.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/ntp_snippets/pref_names.cc View 1 chunk +3 lines, -1 line 0 comments Download
M components/ntp_snippets_strings.grdp View 1 chunk +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 30 (10 generated)
Philipp Keck
PTAL
4 years, 4 months ago (2016-08-12 07:38:55 UTC) #3
Marc Treib
https://codereview.chromium.org/2245583002/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2245583002/diff/1/chrome/app/generated_resources.grd#newcode15142 chrome/app/generated_resources.grd:15142: + Show recent tabs on the New Tab page ...
4 years, 4 months ago (2016-08-12 09:21:14 UTC) #5
Philipp Keck
Thank you https://codereview.chromium.org/2245583002/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2245583002/diff/1/chrome/app/generated_resources.grd#newcode15142 chrome/app/generated_resources.grd:15142: + Show recent tabs on the New ...
4 years, 4 months ago (2016-08-12 09:56:40 UTC) #6
Philipp Keck
bauerb@chromium.org: Please review changes in chrome/browser/resources/snippets_internals.html chrome/browser/ui/webui/snippets_internals_message_handler.cc
4 years, 4 months ago (2016-08-12 09:57:45 UTC) #8
Marc Treib
lgtm https://codereview.chromium.org/2245583002/diff/1/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/2245583002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode99 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:99: } else if (category == downloads_category_) { On ...
4 years, 4 months ago (2016-08-12 10:12:53 UTC) #9
Philipp Keck
https://codereview.chromium.org/2245583002/diff/1/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/2245583002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode226 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:226: bool needDownloads = recent_tabs_status_ != CategoryStatus::NOT_PROVIDED; On 2016/08/12 10:12:53, ...
4 years, 4 months ago (2016-08-12 10:22:55 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/2245583002/diff/1/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/2245583002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode99 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:99: } else if (category == downloads_category_) { On 2016/08/12 ...
4 years, 4 months ago (2016-08-12 10:28:31 UTC) #11
Philipp Keck
Please take a look at the changes in patch set 4. Currently, the offline pages ...
4 years, 4 months ago (2016-08-12 11:02:26 UTC) #12
Philipp Keck
Made another small change (patch set 6) to read the new title field that the ...
4 years, 4 months ago (2016-08-12 11:09:57 UTC) #14
Marc Treib
On 2016/08/12 11:09:57, Philipp Keck wrote: > Made another small change (patch set 6) to ...
4 years, 4 months ago (2016-08-12 11:11:09 UTC) #15
Bernhard Bauer
lgtm
4 years, 4 months ago (2016-08-12 11:31:28 UTC) #16
Philipp Keck
Marc, Bernhard, PTAL at Patch Set 8. After rebasing on the more-button CL (patch set ...
4 years, 4 months ago (2016-08-12 13:02:49 UTC) #17
Marc Treib
https://codereview.chromium.org/2245583002/diff/140001/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/2245583002/diff/140001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode112 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:112: /* has_more_button */ true); Where would this "more" button ...
4 years, 4 months ago (2016-08-12 13:05:43 UTC) #18
Bernhard Bauer
On 2016/08/12 13:02:49, Philipp Keck wrote: > Marc, Bernhard, PTAL at Patch Set 8. > ...
4 years, 4 months ago (2016-08-12 13:06:02 UTC) #19
Philipp Keck
https://codereview.chromium.org/2245583002/diff/140001/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/2245583002/diff/140001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode112 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:112: /* has_more_button */ true); On 2016/08/12 13:05:43, Marc Treib ...
4 years, 4 months ago (2016-08-12 13:09:44 UTC) #21
Marc Treib
LGTM (my third on this CL - land this already!! ;) ) https://codereview.chromium.org/2245583002/diff/140001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc ...
4 years, 4 months ago (2016-08-12 13:13:36 UTC) #22
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/2245583002/180001
4 years, 4 months ago (2016-08-12 13:15:17 UTC) #25
Philipp Keck
On 2016/08/12 13:13:36, Marc Treib wrote: > LGTM (my third on this CL - land ...
4 years, 4 months ago (2016-08-12 13:16:39 UTC) #26
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2016-08-12 14:34:56 UTC) #28
commit-bot: I haz the power
4 years, 4 months ago (2016-08-12 14:38:58 UTC) #30
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/c4fe8dd8b922142e6c3499369007688fd087bfcb
Cr-Commit-Position: refs/heads/master@{#411645}

Powered by Google App Engine
This is Rietveld 408576698