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

Issue 2256643002: Add a fallback to creation date for Recent bookmarks on NTP (Closed)

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

Description

Add a fallback to creation date for Recent bookmarks on NTP This fallback is active when we have less bookmarks with last visit info than specified by Finch (defaults to 3). This is relevant for existing users after they update to m54. In this fallback mode, we - use creation date instead of (missing) last visit date and - do not impose age limit on bookmarks to show BUG=638538 Committed: https://crrev.com/a14bce74b74b8a043608b485dda1cb65191b24da Cr-Commit-Position: refs/heads/master@{#412782}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Marc's comments #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -43 lines) Patch
M components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h View 1 2 chunks +9 lines, -4 lines 2 comments Download
M components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc View 1 3 chunks +63 lines, -37 lines 8 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc View 1 4 chunks +15 lines, -2 lines 4 comments Download

Messages

Total messages: 24 (14 generated)
jkrcal
Marc, PTAL.
4 years, 4 months ago (2016-08-17 10:09:49 UTC) #4
Marc Treib
Code mostly looks good, but I have some concerns about the overall approach. See comments ...
4 years, 4 months ago (2016-08-17 11:29:06 UTC) #7
jkrcal
Marc, PTAL, again.
4 years, 4 months ago (2016-08-17 15:27:24 UTC) #10
Marc Treib
LGTM with a few nits which can be cleaned up afterwards, so I'll land this! ...
4 years, 4 months ago (2016-08-18 09:31:44 UTC) #14
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/2256643002/20001
4 years, 4 months ago (2016-08-18 09:32:12 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-18 10:04:49 UTC) #18
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/a14bce74b74b8a043608b485dda1cb65191b24da Cr-Commit-Position: refs/heads/master@{#412782}
4 years, 4 months ago (2016-08-18 10:08:20 UTC) #20
Philipp Keck
The comments below are fixed here: https://codereview.chromium.org/2256183004/#ps1 https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc File components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc (right): https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc#newcode75 components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc:75: return node->date_added(); ...
4 years, 4 months ago (2016-08-19 11:20:54 UTC) #22
Marc Treib
https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc File components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc (right): https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc#newcode144 components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc:144: if (most_recent == bookmarks_for_url.end()) On 2016/08/19 11:20:54, Philipp Keck ...
4 years, 4 months ago (2016-08-19 11:25:41 UTC) #23
Philipp Keck
4 years, 4 months ago (2016-08-19 12:27:45 UTC) #24
Message was sent while issue was closed.
https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets...
File components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc (right):

https://codereview.chromium.org/2256643002/diff/20001/components/ntp_snippets...
components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc:144: if
(most_recent == bookmarks_for_url.end())
On 2016/08/19 11:25:41, Marc Treib wrote:
> On 2016/08/19 11:20:54, Philipp Keck wrote:
> > On 2016/08/18 09:31:44, Marc Treib wrote:
> > > Can this ever happen? I think it can't, so I'd just remove the check.
> > 
> > Right, done. We could think about adding DCHECK(bookmarks_for_url.size())
> above,
> > but that shouldn't be necessary either (unless we consider concurrent
updates
> to
> > the bookmark model?).
> 
> Well, a DCHECK is never stricly necessary, it just documents some
pre-condition
> or assumption. So it might make sense to add one here.

Done.
https://codereview.chromium.org/2256183004/diff2/20001:40001/components/ntp_s...

Powered by Google App Engine
This is Rietveld 408576698