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

Issue 2388783004: Ensure PopularSite icon availability in ntp_tiles. (Closed)

Created:
4 years, 2 months ago by sfiera
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, agrieve+watch_chromium.org, noyau (Ping after 24h)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure PopularSite icon availability in ntp_tiles. Previously, MostVisitedSites dumped all PopularSites information into its own observer, then let Java ensure availability of icons. Popular Sites on iOS needs these icons cached too, so the component should handle icon availability itself. MostVisitedSites::Observer::OnPopularURLsAvailable() is removed and MostVisitedSites::Observer::OnIconMadeAvailable() is added in its place. Note that FaviconHelper.ensureIconIsAvailable() hasn't been removed in this CL, as it's still used to load favicons for snippets. Of course, one day, iOS will need to do that too, so an eventual plan to share IconCacher and broaden its interface makes sense (maybe coupled with a move to the favicon component?). BUG=631990 Committed: https://crrev.com/ae1ae693f77cfef75097263227b958389cae471b Cr-Commit-Position: refs/heads/master@{#427100}

Patch Set 1 #

Patch Set 2 : Out-of-line destructor. #

Patch Set 3 : Remove no-longer-needed code. #

Patch Set 4 : Merge branch 'refs/heads/master' into icons #

Patch Set 5 : Update iOS factory. #

Patch Set 6 : Update iOS factory. #

Patch Set 7 : Fix comments, variable names. #

Total comments: 56

Patch Set 8 : Address review comments. #

Patch Set 9 : Fetch popular site icons only when needed. #

Total comments: 5

Patch Set 10 : Add DCHECK. #

Patch Set 11 : Merge branch 'master' into icons #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -52 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -21 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java View 1 2 3 4 5 6 7 2 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/android/ntp/most_visited_sites_bridge.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +18 lines, -16 lines 0 comments Download
M components/ntp_tiles/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -0 lines 0 comments Download
M components/ntp_tiles/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
A components/ntp_tiles/icon_cacher.h View 1 2 3 4 5 6 7 8 9 1 chunk +70 lines, -0 lines 0 comments Download
A components/ntp_tiles/icon_cacher.cc View 1 2 3 4 5 6 7 8 1 chunk +81 lines, -0 lines 0 comments Download
A components/ntp_tiles/icon_cacher_unittest.cc View 1 2 3 4 5 6 7 1 chunk +197 lines, -0 lines 0 comments Download
M components/ntp_tiles/most_visited_sites.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -1 line 0 comments Download
M components/ntp_tiles/most_visited_sites.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +12 lines, -4 lines 0 comments Download
M components/ntp_tiles/popular_sites.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.cc View 1 2 3 4 1 chunk +19 lines, -1 line 0 comments Download

Messages

Total messages: 59 (41 generated)
sfiera
A preview. I need to look over this more before a proper review, but that ...
4 years, 2 months ago (2016-10-04 15:29:40 UTC) #9
sfiera
Ready for a proper review now. I elected to fetch the icons for all popular ...
4 years, 2 months ago (2016-10-12 05:08:13 UTC) #20
sfiera
4 years, 2 months ago (2016-10-12 05:09:04 UTC) #22
Marc Treib
Bunch of comments, all small. However, I'd indeed be happier if we could retain the ...
4 years, 2 months ago (2016-10-12 09:11:29 UTC) #25
Marc Treib
Ah, also: You asked Eric something, but he isn't actually on the reviewer list :)
4 years, 2 months ago (2016-10-12 09:12:08 UTC) #26
sfiera
Thanks! +stevenjb for favicon deps +bauerb for Java https://codereview.chromium.org/2388783004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java File chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java (right): https://codereview.chromium.org/2388783004/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java#newcode38 chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java:38: * ...
4 years, 2 months ago (2016-10-13 09:06:46 UTC) #32
sfiera
Fetching on demand turned out to be pretty easy. Verified it by dismissing popular sites; ...
4 years, 2 months ago (2016-10-13 09:07:27 UTC) #33
Marc Treib
Thanks! LGTM https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc File chrome/browser/android/ntp/most_visited_sites_bridge.cc (right): https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc#newcode171 chrome/browser/android/ntp/most_visited_sites_bridge.cc:171: ServiceAccessType::IMPLICIT_ACCESS), On 2016/10/13 09:06:45, sfiera wrote: > ...
4 years, 2 months ago (2016-10-13 12:31:16 UTC) #36
Bernhard Bauer
https://codereview.chromium.org/2388783004/diff/120001/components/ntp_tiles/icon_cacher_unittest.cc File components/ntp_tiles/icon_cacher_unittest.cc (right): https://codereview.chromium.org/2388783004/diff/120001/components/ntp_tiles/icon_cacher_unittest.cc#newcode49 components/ntp_tiles/icon_cacher_unittest.cc:49: CHECK(history_dir_.CreateUniqueTempDir()); On 2016/10/13 09:06:46, sfiera wrote: > On 2016/10/12 ...
4 years, 2 months ago (2016-10-13 13:20:09 UTC) #37
sfiera
Oops, missed +stevenjb in my previous email. https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc File chrome/browser/android/ntp/most_visited_sites_bridge.cc (right): https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc#newcode171 chrome/browser/android/ntp/most_visited_sites_bridge.cc:171: ServiceAccessType::IMPLICIT_ACCESS), On ...
4 years, 2 months ago (2016-10-14 06:27:33 UTC) #42
Marc Treib
https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc File chrome/browser/android/ntp/most_visited_sites_bridge.cc (right): https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc#newcode171 chrome/browser/android/ntp/most_visited_sites_bridge.cc:171: ServiceAccessType::IMPLICIT_ACCESS), On 2016/10/14 06:27:32, sfiera wrote: > On 2016/10/13 ...
4 years, 2 months ago (2016-10-14 08:46:21 UTC) #45
stevenjb
On 2016/10/14 08:46:21, Marc Treib wrote: > https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc > File chrome/browser/android/ntp/most_visited_sites_bridge.cc (right): > > https://codereview.chromium.org/2388783004/diff/120001/chrome/browser/android/ntp/most_visited_sites_bridge.cc#newcode171 ...
4 years, 2 months ago (2016-10-14 20:09:50 UTC) #46
Bernhard Bauer
https://codereview.chromium.org/2388783004/diff/160001/components/ntp_tiles/icon_cacher_unittest.cc File components/ntp_tiles/icon_cacher_unittest.cc (right): https://codereview.chromium.org/2388783004/diff/160001/components/ntp_tiles/icon_cacher_unittest.cc#newcode119 components/ntp_tiles/icon_cacher_unittest.cc:119: EXPECT_CALL(done, Call(false)).WillOnce(Quit(&loop)); On 2016/10/14 06:27:32, sfiera wrote: > On ...
4 years, 2 months ago (2016-10-17 14:38:38 UTC) #47
Marc Treib
> I am not familiar with any of this code, what did you want me ...
4 years, 2 months ago (2016-10-20 08:25:04 UTC) #48
stevenjb
RS OWNER lgtm for adding the favicon dependency.
4 years, 2 months ago (2016-10-20 18:26:55 UTC) #49
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/2388783004/200001
4 years, 1 month ago (2016-10-24 18:03:38 UTC) #55
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-10-24 18:19:37 UTC) #57
commit-bot: I haz the power
4 years, 1 month ago (2016-10-24 18:22:49 UTC) #59
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/ae1ae693f77cfef75097263227b958389cae471b
Cr-Commit-Position: refs/heads/master@{#427100}

Powered by Google App Engine
This is Rietveld 408576698