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

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)

Created:
3 years, 7 months ago by jkrcal
Modified:
3 years, 6 months ago
Reviewers:
pkotwicz, brettw
CC:
chromium-reviews, mastiz
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Thumbnails DB] Allow setting last_requested time when accessing favicons. This CL deals with favicons that are added without the user visiting the corresponding page. The CL introduces the notion of "on-demand" favicons for them: 1) The CL reuses (and renames) an existing function in FaviconService for storing such on-demand favicons and pushes this concept further to ThumbnailDatabase. 2) The CL adds a new function to touch (i.e. update last_requested time-stamp) for "on-deman" favicons. The functionality to clear unused on-demand favicons is left for a further CL (https://codereview.chromium.org/2903573002/). Similarly, calling TouchOnDemandFavicon from LargeIconService is also left for a later CL. BUG=709471 Review-Url: https://codereview.chromium.org/2856873002 Cr-Commit-Position: refs/heads/master@{#481232} Committed: https://chromium.googlesource.com/chromium/src/+/97b537bf1aba5ca6e106920faa65f140dd80df32

Patch Set 1 #

Patch Set 2 : Minor touches #

Total comments: 7

Patch Set 3 : Rebase #

Patch Set 4 : Filter out bookmarks #

Total comments: 1

Patch Set 5 : Filtering updates by bookmarks #

Patch Set 6 : A new version: update the requested time explicitly #

Patch Set 7 : Adapting and extending unit-tests #

Patch Set 8 : Minor fixes #

Patch Set 9 : Minor fixes #2 #

Patch Set 10 : Splitting off clearing #

Total comments: 14

Patch Set 11 : Rebase #

Patch Set 12 : Peter's comments #

Total comments: 34

Patch Set 13 : Peter's comments #2 #

Total comments: 6

Patch Set 14 : Rebase #

Patch Set 15 : Brett's comment #

Patch Set 16 : Peter's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -226 lines) Patch
M components/favicon/core/favicon_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +26 lines, -7 lines 0 comments Download
M components/favicon/core/favicon_service_impl.h View 1 2 3 4 5 6 2 chunks +6 lines, -5 lines 0 comments Download
M components/favicon/core/favicon_service_impl.cc View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M components/favicon/core/large_icon_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M components/favicon/core/large_icon_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +9 lines, -9 lines 0 comments Download
M components/favicon/core/test/mock_favicon_service.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M components/history/core/browser/android/favicon_sql_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M components/history/core/browser/history_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +15 lines, -12 lines 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +38 lines, -27 lines 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +39 lines, -42 lines 0 comments Download
M components/history/core/browser/history_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +25 lines, -6 lines 0 comments Download
M components/history/core/browser/history_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +14 lines, -7 lines 0 comments Download
M components/history/core/browser/history_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +18 lines, -0 lines 0 comments Download
M components/history/core/browser/thumbnail_database.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +28 lines, -14 lines 0 comments Download
M components/history/core/browser/thumbnail_database.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +76 lines, -26 lines 0 comments Download
M components/history/core/browser/thumbnail_database_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +173 lines, -63 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (14 generated)
jkrcal
Peter, could you PTAL? https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc#newcode1513 components/history/core/browser/history_backend.cc:1513: largest_icon.bitmap_id, /*access_time=*/Time::Now(), &last_updated, For all ...
3 years, 7 months ago (2017-05-02 13:57:25 UTC) #2
pkotwicz
Sorry that I didn't get to the CL today. :( I'll take a look at ...
3 years, 7 months ago (2017-05-03 05:43:23 UTC) #3
pkotwicz
Sorry that I didn't get to the CL today. :( I'll take a look at ...
3 years, 7 months ago (2017-05-03 05:43:23 UTC) #4
pkotwicz
Substituting myself with sky@ who will likely have an opinion The CL looks reasonable to ...
3 years, 7 months ago (2017-05-03 17:29:00 UTC) #6
sky
Could you elaborate on how last_requested will be used?
3 years, 7 months ago (2017-05-04 15:27:37 UTC) #7
jkrcal
On 2017/05/04 15:27:37, sky wrote: > Could you elaborate on how last_requested will be used? ...
3 years, 7 months ago (2017-05-04 15:34:54 UTC) #8
pkotwicz
Scott: I think that the |last_requested| field will be used as outlined in the "Removing ...
3 years, 7 months ago (2017-05-04 15:35:55 UTC) #9
sky
Thanks for refreshing my memory! I'm at a meeting all day and will review either ...
3 years, 7 months ago (2017-05-04 15:45:57 UTC) #10
jkrcal
On 2017/05/04 15:45:57, sky wrote: > Thanks for refreshing my memory! I'm at a meeting ...
3 years, 7 months ago (2017-05-04 15:47:26 UTC) #11
sky
Remember that incognito profiles share the history backend/profile of the real profile. The scenario here ...
3 years, 7 months ago (2017-05-04 17:29:59 UTC) #12
pkotwicz
https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/thumbnail_database.cc#newcode448 components/history/core/browser/thumbnail_database.cc:448: DeleteOrphanagedMappings(&db_); Drive by: Is it possible that this will ...
3 years, 7 months ago (2017-05-04 18:34:19 UTC) #13
jkrcal
Thanks for the comments! Scott, I am not sure about that. Do we download and ...
3 years, 7 months ago (2017-05-05 16:36:46 UTC) #14
sky
On Fri, May 5, 2017 at 9:36 AM, <jkrcal@chromium.org> wrote: > Thanks for the comments! ...
3 years, 7 months ago (2017-05-05 17:42:58 UTC) #15
jkrcal
I am sorry for the long delay. I've implemented the comment by Peter. I've also ...
3 years, 7 months ago (2017-05-15 14:26:58 UTC) #17
sky
https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc#newcode1513 components/history/core/browser/history_backend.cc:1513: largest_icon.bitmap_id, /*access_time=*/Time::Now(), &last_updated, On 2017/05/15 14:26:57, jkrcal wrote: > ...
3 years, 7 months ago (2017-05-15 15:57:13 UTC) #18
jkrcal
Thanks! https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2856873002/diff/20001/components/history/core/browser/history_backend.cc#newcode1513 components/history/core/browser/history_backend.cc:1513: largest_icon.bitmap_id, /*access_time=*/Time::Now(), &last_updated, On 2017/05/15 15:57:13, sky wrote: ...
3 years, 7 months ago (2017-05-15 18:36:29 UTC) #19
sky
On Mon, May 15, 2017 at 11:36 AM, <jkrcal@chromium.org> wrote: > Thanks! > > > ...
3 years, 7 months ago (2017-05-15 21:32:27 UTC) #20
jkrcal
> > Adding the incognito bit into whole GetFavicon* API feels really ugly. I > ...
3 years, 7 months ago (2017-05-16 18:03:00 UTC) #21
pkotwicz
Jan, I still need to think some more about your questions w.r.t to the SQL ...
3 years, 7 months ago (2017-05-17 05:56:22 UTC) #22
pkotwicz
Jan, I still need to think some more about your questions w.r.t to the SQL ...
3 years, 7 months ago (2017-05-17 05:56:25 UTC) #23
pkotwicz
https://codereview.chromium.org/2856873002/diff/80001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/80001/components/history/core/browser/thumbnail_database.cc#newcode447 components/history/core/browser/thumbnail_database.cc:447: "icon_mapping.icon_id AND favicon_bitmaps.last_requested<?;")); It we end up setting last_requested ...
3 years, 7 months ago (2017-05-17 14:56:49 UTC) #24
sky
On Tue, May 16, 2017 at 11:03 AM, <jkrcal@chromium.org> wrote: > > > Adding the ...
3 years, 7 months ago (2017-05-17 18:25:05 UTC) #25
jkrcal
Thanks for the comments! I am not really happy about any of the options :| ...
3 years, 7 months ago (2017-05-19 14:57:10 UTC) #26
pkotwicz
Favicons are unfortunately also shown for incognito tabs: - in the tab strip on desktop ...
3 years, 7 months ago (2017-05-19 18:49:57 UTC) #27
jkrcal
On 2017/05/19 18:49:57, pkotwicz wrote: > Favicons are unfortunately also shown for incognito tabs: > ...
3 years, 7 months ago (2017-05-22 14:55:04 UTC) #28
jkrcal
I uploaded the next version as promised in a message from yesterday. PTAL! (I've split ...
3 years, 7 months ago (2017-05-23 14:18:40 UTC) #31
pkotwicz
I'll take a look at your CL tomorrow. Sorry for the dleay (Monday was a ...
3 years, 7 months ago (2017-05-24 05:14:25 UTC) #32
jkrcal
No worries. No hurry as I am OOO Thu - Fri.
3 years, 7 months ago (2017-05-24 07:10:10 UTC) #33
pkotwicz
Your CL looks mostly good https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/history_backend.cc#newcode1912 components/history/core/browser/history_backend.cc:1912: bool on_demand) { Maybe ...
3 years, 7 months ago (2017-05-24 15:43:31 UTC) #34
sky
https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/thumbnail_database.cc#newcode533 components/history/core/browser/thumbnail_database.cc:533: const gfx::Size& pixel_size) { On 2017/05/24 15:43:31, pkotwicz wrote: ...
3 years, 7 months ago (2017-05-24 18:20:15 UTC) #35
jkrcal
Thanks! Could you please take another look? https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/history_backend.cc#newcode1912 components/history/core/browser/history_backend.cc:1912: bool on_demand) ...
3 years, 6 months ago (2017-06-06 15:41:55 UTC) #36
pkotwicz
I'll take a look at your CL tomorrow morning
3 years, 6 months ago (2017-06-07 05:02:54 UTC) #38
pkotwicz
LGTM with comments https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/thumbnail_database.cc#newcode610 components/history/core/browser/thumbnail_database.cc:610: I see now. https://codereview.chromium.org/2856873002/diff/200001/components/history/core/browser/thumbnail_database.cc#newcode618 components/history/core/browser/thumbnail_database.cc:618: time ...
3 years, 6 months ago (2017-06-07 17:40:54 UTC) #39
jkrcal
Thanks, Peter! Scott, could you please take another look? https://codereview.chromium.org/2856873002/diff/260001/components/favicon/core/favicon_service.h File components/favicon/core/favicon_service.h (right): https://codereview.chromium.org/2856873002/diff/260001/components/favicon/core/favicon_service.h#newcode145 components/favicon/core/favicon_service.h:145: ...
3 years, 6 months ago (2017-06-09 16:38:38 UTC) #40
pkotwicz
Still LGTM
3 years, 6 months ago (2017-06-09 23:47:09 UTC) #41
pkotwicz
https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc#newcode609 components/history/core/browser/thumbnail_database.cc:609: time - base::TimeDelta::FromDays(kFaviconUpdateLastRequestedAfterDays); Nit: You can move the initialization ...
3 years, 6 months ago (2017-06-09 23:47:24 UTC) #42
pkotwicz
https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.h File components/history/core/browser/thumbnail_database.h (right): https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.h#newcode30 components/history/core/browser/thumbnail_database.h:30: // All sooner updates are ignored. Nit: sooner -> ...
3 years, 6 months ago (2017-06-09 23:48:27 UTC) #43
sky
I'm about to go on vacation. sky->brettw
3 years, 6 months ago (2017-06-09 23:50:07 UTC) #45
jkrcal
On 2017/06/09 23:50:07, sky OOO wrote: > I'm about to go on vacation. sky->brettw Brett, ...
3 years, 6 months ago (2017-06-13 07:53:23 UTC) #46
brettw
owners lgtm https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc#newcode73 components/history/core/browser/thumbnail_database.cc:73: // only used for bitmaps of type ...
3 years, 6 months ago (2017-06-19 19:31:07 UTC) #47
jkrcal
Thanks! https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2856873002/diff/280001/components/history/core/browser/thumbnail_database.cc#newcode73 components/history/core/browser/thumbnail_database.cc:73: // only used for bitmaps of type ON_DEMAND, ...
3 years, 6 months ago (2017-06-21 16:05:51 UTC) #50
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/2856873002/340001
3 years, 6 months ago (2017-06-21 17:21:15 UTC) #54
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 17:27:49 UTC) #57
Message was sent while issue was closed.
Committed patchset #16 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/97b537bf1aba5ca6e106920faa65...

Powered by Google App Engine
This is Rietveld 408576698