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

Issue 2903573002: [Thumbnails DB] Add functionality to clear unused on-demand favicons. (Closed)

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

Description

[Thumbnails DB] Add functionality to clear unused on-demand favicons. The preceding CL 2856873002 adds a concept of on-demand favicons into ThumbnailsDatabase that should get evicted based on last_requested timestamp. This CL adds the functionality to clear on-demand favicons that have not been used for long. BUG=709471 Review-Url: https://codereview.chromium.org/2903573002 Cr-Commit-Position: refs/heads/master@{#489307} Committed: https://chromium.googlesource.com/chromium/src/+/9946c3ce2b116a954f25a63a19be1ba414b3be53

Patch Set 1 #

Total comments: 10

Patch Set 2 : Rebase #

Patch Set 3 : Peter's comments #

Total comments: 11

Patch Set 4 : Peter's comments #2 #

Patch Set 5 : Implementation variants + unit-tests #

Total comments: 2

Patch Set 6 : Peter's comments #3 #

Total comments: 35

Patch Set 7 : Peter's comments #3 #

Patch Set 8 : One forgotten nit #

Patch Set 9 : Fix a failing test and minor cleanup #

Patch Set 10 : Another build fix #

Total comments: 20

Patch Set 11 : Peter's comments #4 #

Total comments: 11

Patch Set 12 : Peter's comments #5 #

Patch Set 13 : Update naming in expire_history_backend #

Total comments: 6

Patch Set 14 : Brett's comments #

Total comments: 8

Patch Set 15 : Brett's comments (done by mastiz@) #

Patch Set 16 : Compile error fixes #

Patch Set 17 : Compile error fixes #2 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+433 lines, -4 lines) Patch
M components/history/core/browser/expire_history_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +22 lines, -0 lines 0 comments Download
M components/history/core/browser/expire_history_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +63 lines, -3 lines 0 comments Download
M components/history/core/browser/expire_history_backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +146 lines, -0 lines 0 comments Download
M components/history/core/browser/history_types.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M components/history/core/browser/history_types.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 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 2 chunks +9 lines, -0 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 16 2 chunks +42 lines, -1 line 1 comment Download
M components/history/core/browser/thumbnail_database_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +130 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (35 generated)
jkrcal
Could you PTAL? (detailed comments do not make sense before the previous CL https://codereview.chromium.org/2856873002/ stabilizes ...
3 years, 7 months ago (2017-05-23 14:19:58 UTC) #4
pkotwicz
The code looks mostly good https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode462 components/history/core/browser/thumbnail_database.cc:462: "favicon_bitmaps.last_requested<?;")); If: 1) SetOnDemandFavicons() ...
3 years, 6 months ago (2017-05-24 17:05:03 UTC) #7
jkrcal
Thanks! Peter, could you please take another look? https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode462 components/history/core/browser/thumbnail_database.cc:462: "favicon_bitmaps.last_requested<?;")); ...
3 years, 6 months ago (2017-06-21 17:19:20 UTC) #8
pkotwicz
https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode477 components/history/core/browser/thumbnail_database.cc:477: ids_to_delete.erase(bitmap_id); Ahhh. I see now. Thank you for the ...
3 years, 6 months ago (2017-06-21 19:50:18 UTC) #9
jkrcal
Thanks! PTAL, again. https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode462 components/history/core/browser/thumbnail_database.cc:462: "favicon_bitmaps.last_requested<?;")); On 2017/06/21 17:19:20, jkrcal wrote: ...
3 years, 6 months ago (2017-06-22 11:22:12 UTC) #10
pkotwicz
https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode462 components/history/core/browser/thumbnail_database.cc:462: "favicon_bitmaps.last_requested<?;")); I don't see a problem in expiring the ...
3 years, 6 months ago (2017-06-22 20:32:23 UTC) #11
jkrcal
Thanks for your comments! Could you PTAL? (I am sorry for the delay, I've been ...
3 years, 5 months ago (2017-07-06 17:01:48 UTC) #12
pkotwicz
Mostly nits https://codereview.chromium.org/2903573002/diff/100001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/100001/components/history/core/browser/expire_history_backend.cc#newcode523 components/history/core/browser/expire_history_backend.cc:523: !thumb_db_->DeleteIconMappingsForFaviconId(icon_id)) Don't you need to update DeleteEffects::deleted_favicons ...
3 years, 5 months ago (2017-07-07 00:42:39 UTC) #13
jkrcal
Thanks for the detailed comments, Peter! Could you PTAL? https://codereview.chromium.org/2903573002/diff/100001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/100001/components/history/core/browser/expire_history_backend.cc#newcode523 components/history/core/browser/expire_history_backend.cc:523: ...
3 years, 5 months ago (2017-07-07 08:45:17 UTC) #16
pkotwicz
Just nits! https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc#newcode119 components/history/core/browser/expire_history_backend.cc:119: std::vector<GURL> urls) { Nit: const std::vector<GURL>& urls ...
3 years, 5 months ago (2017-07-10 05:23:29 UTC) #27
jkrcal
Thanks, Peter! PTAL, again. Brett, could you PTAL? (Adding Brett instead of Scott because Scott ...
3 years, 5 months ago (2017-07-10 16:14:31 UTC) #29
pkotwicz
Looks good from my point of view https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc#newcode508 components/history/core/browser/expire_history_backend.cc:508: std::map<favicon_base::FaviconID, FaviconURLs> ...
3 years, 5 months ago (2017-07-10 19:50:18 UTC) #30
pkotwicz
Looks good from my point of view https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc#newcode508 components/history/core/browser/expire_history_backend.cc:508: std::map<favicon_base::FaviconID, FaviconURLs> ...
3 years, 5 months ago (2017-07-10 19:50:19 UTC) #31
jkrcal
Thanks, Peter! Brett, friendly ping! https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/180001/components/history/core/browser/expire_history_backend.cc#newcode508 components/history/core/browser/expire_history_backend.cc:508: std::map<favicon_base::FaviconID, FaviconURLs> favicons = ...
3 years, 5 months ago (2017-07-11 13:19:35 UTC) #32
pkotwicz
LGTM. Thank you for bearing with me. https://codereview.chromium.org/2903573002/diff/200001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/2903573002/diff/200001/components/history/core/browser/thumbnail_database.cc#newcode428 components/history/core/browser/thumbnail_database.cc:428: "(last_requested>0 AND ...
3 years, 5 months ago (2017-07-11 14:41:04 UTC) #33
brettw
Am I correct that on-demand favicons come when you have a NTP item you haven't ...
3 years, 5 months ago (2017-07-11 19:26:43 UTC) #34
jkrcal
On 2017/07/11 19:26:43, brettw wrote: > Am I correct that on-demand favicons come when you ...
3 years, 5 months ago (2017-07-11 19:42:59 UTC) #35
brettw
On 2017/07/11 19:42:59, jkrcal wrote: > Ah, good point. I still think that putting the ...
3 years, 5 months ago (2017-07-12 18:29:47 UTC) #36
jkrcal
Thanks, PTAL, again! https://codereview.chromium.org/2903573002/diff/240001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/240001/components/history/core/browser/expire_history_backend.cc#newcode496 components/history/core/browser/expire_history_backend.cc:496: // Otherwise do a final clean-up ...
3 years, 5 months ago (2017-07-13 20:26:10 UTC) #37
brettw
lgtm https://codereview.chromium.org/2903573002/diff/260001/components/history/core/browser/expire_history_backend.cc File components/history/core/browser/expire_history_backend.cc (right): https://codereview.chromium.org/2903573002/diff/260001/components/history/core/browser/expire_history_backend.cc#newcode513 components/history/core/browser/expire_history_backend.cc:513: if (expiration_threshold < Can you put a comment ...
3 years, 5 months ago (2017-07-13 23:50:17 UTC) #42
mastiz
jkrcal@ is OOO and has asked me to follow up on the remaining nits. I've ...
3 years, 5 months ago (2017-07-18 07:48:19 UTC) #44
jkrcal
Sorry for the confusion, I am back from vacation and have uploaded the version of ...
3 years, 4 months ago (2017-07-25 13:40:17 UTC) #51
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/2903573002/320001
3 years, 4 months ago (2017-07-25 15:17:20 UTC) #56
commit-bot: I haz the power
3 years, 4 months ago (2017-07-25 15:23:26 UTC) #59
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/9946c3ce2b116a954f25a63a19be...

Powered by Google App Engine
This is Rietveld 408576698