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

Issue 1863133003: [NTP Snippets] Re-fetch snippets on ML changes only when the hosts actually change (Closed)

Created:
4 years, 8 months ago by Marc Treib
Modified:
4 years, 8 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, mcwilliams+watch_chromium.org, dgn+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@snippets_thumbnails
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Snippets] Re-fetch snippets on ML changes only when the hosts actually change Every time the NTP is opened, the suggestions are refreshed, resulting in an OnSuggestionsChanged call. Instead of blindly re-fetching snippets each time, store the list of hosts we saw previously, and only re-fetch when those change. BUG=601034 Committed: https://crrev.com/9b08521135f70763c671ea87c6d792c82b690b79 Cr-Commit-Position: refs/heads/master@{#386023}

Patch Set 1 #

Total comments: 3

Patch Set 2 : s/vector/set/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -12 lines) Patch
M components/ntp_snippets/ntp_snippets_fetcher.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_fetcher.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_snippets/ntp_snippets_service.h View 1 3 chunks +5 lines, -1 line 0 comments Download
M components/ntp_snippets/ntp_snippets_service.cc View 1 6 chunks +35 lines, -8 lines 0 comments Download
M components/ntp_snippets/pref_names.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/ntp_snippets/pref_names.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Marc Treib
PTAL! https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc#newcode230 components/ntp_snippets/ntp_snippets_service.cc:230: return !std::binary_search(hosts.begin(), hosts.end(), Side-effect of the hosts now ...
4 years, 8 months ago (2016-04-06 16:14:55 UTC) #2
Bernhard Bauer
https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc#newcode230 components/ntp_snippets/ntp_snippets_service.cc:230: return !std::binary_search(hosts.begin(), hosts.end(), On 2016/04/06 16:14:55, Marc Treib wrote: ...
4 years, 8 months ago (2016-04-07 12:28:12 UTC) #3
Marc Treib
https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc#newcode230 components/ntp_snippets/ntp_snippets_service.cc:230: return !std::binary_search(hosts.begin(), hosts.end(), On 2016/04/07 12:28:12, Bernhard Bauer wrote: ...
4 years, 8 months ago (2016-04-07 13:19:54 UTC) #4
Marc Treib
On 2016/04/07 13:19:54, Marc Treib wrote: > https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc > File components/ntp_snippets/ntp_snippets_service.cc (right): > > https://codereview.chromium.org/1863133003/diff/1/components/ntp_snippets/ntp_snippets_service.cc#newcode230 ...
4 years, 8 months ago (2016-04-08 08:15:32 UTC) #5
Bernhard Bauer
Sorry, I thought I had replied to this one. LGTM!
4 years, 8 months ago (2016-04-08 08:17:34 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1863133003/10001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1863133003/10001
4 years, 8 months ago (2016-04-08 08:20:18 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:10001)
4 years, 8 months ago (2016-04-08 09:08:56 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 09:10:26 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9b08521135f70763c671ea87c6d792c82b690b79
Cr-Commit-Position: refs/heads/master@{#386023}

Powered by Google App Engine
This is Rietveld 408576698