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

Issue 1004373002: Add last_requested field to the favicon_bitmaps table of the favicons database. (Closed)

Created:
5 years, 9 months ago by Roger McFarlane (Chromium)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, browser-components-watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add last_requested field to the favicon_bitmaps table of the favicons database. This CL adds a last_requested timestamp for each favicon bitmap. In a coming change, large icons will be fetched for display on the New Tab page. To avoid having the database storage used for large bitmaps grow unreasonably large, the last_requested field will be used to implement a cache eviction policy for these large icons. The cache cleanup policy applied to regular-sized favicons remains unchanged. As of 2015/03/17, the number of icons in the icons DB of reporting users, is distributed approximately as follows: * 50% have less than 100 * 75% have less than 200 * 85% have less than 300 * 90% have less than 400 * 98% have less than 1000 * No users exceed 10000 icons. Adding an additional integer field to the table for such small database sizes should not significantly affect the resources consumed by the database. Design Doc: https://docs.google.com/document/d/1rv4x3goTWFJzQu5a_h94xfNhSUG3sU98lfxa1Prys1w/edit BUG=467712 Committed: https://crrev.com/982ef2c11eb828b3c3728d1e42784d4b3056b251 Cr-Commit-Position: refs/heads/master@{#323176}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Initial CL for review. #

Total comments: 25

Patch Set 3 : Address review comments #

Total comments: 16

Patch Set 4 : Address 2nd round of comments. #

Total comments: 9

Patch Set 5 : Address comments and rebase for changes exported to other CLs #

Total comments: 2

Patch Set 6 : fix expect/assert #

Total comments: 2

Patch Set 7 : Merge GetFaviconBitmapLastRequestedtime into GetFaviconBitmap. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -38 lines) Patch
M chrome/browser/history/history_backend_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/thumbnail_database_unittest.cc View 1 2 3 4 5 6 5 chunks +185 lines, -3 lines 0 comments Download
A + chrome/test/data/History/Favicons.v8.sql View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M components/history/core/browser/history_types.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M components/history/core/browser/thumbnail_database.h View 1 2 3 4 5 6 4 chunks +10 lines, -0 lines 0 comments Download
M components/history/core/browser/thumbnail_database.cc View 1 2 3 4 5 6 15 chunks +62 lines, -21 lines 0 comments Download

Messages

Total messages: 65 (13 generated)
huangs
A preliminary look. I presume you'll add design docs to the descriptions. https://chromiumcodereview.appspot.com/1004373002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc ...
5 years, 9 months ago (2015-03-14 02:15:26 UTC) #2
Roger McFarlane (Chromium)
https://codereview.chromium.org/1004373002/diff/1/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/1/components/history/core/browser/thumbnail_database.cc#newcode70 components/history/core/browser/thumbnail_database.cc:70: // favicon_bitmap_usage On 2015/03/14 02:15:26, huangs wrote: > I ...
5 years, 9 months ago (2015-03-17 20:55:53 UTC) #4
Roger McFarlane (Chromium)
sky@ - you were suggested by presubmit as an OWNER shess@ - you seem to ...
5 years, 9 months ago (2015-03-17 20:58:14 UTC) #6
Roger McFarlane (Chromium)
Note: I've deferred the pruning to a follow-on CL. On Mar 17, 2015 4:58 PM, ...
5 years, 9 months ago (2015-03-17 21:18:21 UTC) #7
Scott Hess - ex-Googler
How SQLite performs an update is to read the affected pages and rewrite them. It ...
5 years, 9 months ago (2015-03-17 22:07:46 UTC) #8
Roger McFarlane (Chromium)
On 2015/03/17 22:07:46, Scott Hess wrote: > How SQLite performs an update is to read ...
5 years, 9 months ago (2015-03-18 18:28:02 UTC) #9
Scott Hess - ex-Googler
On 2015/03/18 18:28:02, Roger McFarlane (Chromium) wrote: > On 2015/03/17 22:07:46, Scott Hess wrote: > ...
5 years, 9 months ago (2015-03-18 19:29:30 UTC) #10
beaudoin
On 2015/03/18 19:29:30, Scott Hess wrote: > On 2015/03/18 18:28:02, Roger McFarlane (Chromium) wrote: > ...
5 years, 9 months ago (2015-03-18 21:29:53 UTC) #12
Scott Hess - ex-Googler
On 2015/03/18 21:29:53, beaudoin wrote: > Given that I'm confident we can go ahead with ...
5 years, 9 months ago (2015-03-18 21:33:38 UTC) #13
beaudoin
LGTM modulo Scott's comments.
5 years, 9 months ago (2015-03-19 02:00:55 UTC) #14
Roger McFarlane (Chromium)
Thanks. I've addressed the review comments and dropped the last_requested index. Another look? sky@: are ...
5 years, 9 months ago (2015-03-19 17:55:52 UTC) #15
huangs
Few more NITs. https://chromiumcodereview.appspot.com/1004373002/diff/60001/chrome/browser/history/thumbnail_database_unittest.cc File chrome/browser/history/thumbnail_database_unittest.cc (right): https://chromiumcodereview.appspot.com/1004373002/diff/60001/chrome/browser/history/thumbnail_database_unittest.cc#newcode244 chrome/browser/history/thumbnail_database_unittest.cc:244: EXPECT_TRUE(db.SetFaviconBitmapLastRequestedTime(id, now)); NIT: add redundant last_requested ...
5 years, 9 months ago (2015-03-19 19:14:12 UTC) #16
sky
Has this gone through eng review? -Scott On Thu, Mar 19, 2015 at 12:14 PM, ...
5 years, 9 months ago (2015-03-19 19:34:31 UTC) #17
beaudoin
On 2015/03/19 19:34:31, sky wrote: > Has this gone through eng review? > > -Scott ...
5 years, 9 months ago (2015-03-19 19:47:51 UTC) #18
sky
Excellent. I'm going to redirect this to Peter. He should really be in the owners ...
5 years, 9 months ago (2015-03-19 19:50:10 UTC) #20
beaudoin
On 2015/03/19 19:50:10, sky wrote: > Excellent. > > I'm going to redirect this to ...
5 years, 9 months ago (2015-03-19 19:53:39 UTC) #21
pkotwicz
I will look at this tomorrow.
5 years, 9 months ago (2015-03-19 20:49:28 UTC) #22
Scott Hess - ex-Googler
LGTM. I'm going to be OOO until Monday, so apologies if you need to loop ...
5 years, 9 months ago (2015-03-19 21:32:22 UTC) #23
beaudoin
lgtm https://codereview.chromium.org/1004373002/diff/60001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/60001/components/history/core/browser/thumbnail_database.cc#newcode1244 components/history/core/browser/thumbnail_database.cc:1244: // thumbnails table has been obsolete for a ...
5 years, 9 months ago (2015-03-19 21:36:54 UTC) #24
sky
Yes please, send to eng review. On Thu, Mar 19, 2015 at 12:53 PM, <beaudoin@chromium.org> ...
5 years, 9 months ago (2015-03-19 23:08:46 UTC) #25
Roger McFarlane (Chromium)
https://chromiumcodereview.appspot.com/1004373002/diff/60001/chrome/browser/history/thumbnail_database_unittest.cc File chrome/browser/history/thumbnail_database_unittest.cc (right): https://chromiumcodereview.appspot.com/1004373002/diff/60001/chrome/browser/history/thumbnail_database_unittest.cc#newcode244 chrome/browser/history/thumbnail_database_unittest.cc:244: EXPECT_TRUE(db.SetFaviconBitmapLastRequestedTime(id, now)); On 2015/03/19 19:14:11, huangs wrote: > NIT: ...
5 years, 9 months ago (2015-03-20 14:41:00 UTC) #26
pkotwicz
Looks good. Can you please split the portion of this CL which deprecates version 5 ...
5 years, 9 months ago (2015-03-20 19:51:55 UTC) #27
pkotwicz
Ping me when you are ready for another review
5 years, 9 months ago (2015-03-27 02:13:48 UTC) #28
Roger McFarlane (Chromium)
Thanks. Another look? https://codereview.chromium.org/1004373002/diff/60001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/60001/components/history/core/browser/thumbnail_database.cc#newcode450 components/history/core/browser/thumbnail_database.cc:450: // the code simple. http://crbug.com/327485 for ...
5 years, 9 months ago (2015-03-27 14:40:19 UTC) #31
Roger McFarlane (Chromium)
On 2015/03/20 19:51:55, pkotwicz wrote: > Looks good. > > Can you please split the ...
5 years, 9 months ago (2015-03-27 14:41:39 UTC) #32
pkotwicz
LGTM Thanks for your patience! https://codereview.chromium.org/1004373002/diff/140001/chrome/browser/history/thumbnail_database_unittest.cc File chrome/browser/history/thumbnail_database_unittest.cc (right): https://codereview.chromium.org/1004373002/diff/140001/chrome/browser/history/thumbnail_database_unittest.cc#newcode229 chrome/browser/history/thumbnail_database_unittest.cc:229: EXPECT_NE(0, id); Nit: EXPECT_NE ...
5 years, 9 months ago (2015-03-27 17:27:33 UTC) #33
Scott Hess - ex-Googler
https://codereview.chromium.org/1004373002/diff/80001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/80001/components/history/core/browser/thumbnail_database.cc#newcode1393 components/history/core/browser/thumbnail_database.cc:1393: return false; On 2015/03/27 14:40:18, Roger McFarlane (Chromium) wrote: ...
5 years, 9 months ago (2015-03-27 17:59:33 UTC) #34
Scott Hess - ex-Googler
On 2015/03/27 17:59:33, Scott Hess wrote: > https://codereview.chromium.org/1004373002/diff/80001/components/history/core/browser/thumbnail_database.cc > File components/history/core/browser/thumbnail_database.cc (right): > > https://codereview.chromium.org/1004373002/diff/80001/components/history/core/browser/thumbnail_database.cc#newcode1393 ...
5 years, 9 months ago (2015-03-27 18:02:43 UTC) #35
Scott Hess - ex-Googler
On 2015/03/27 18:02:43, Scott Hess wrote: > On 2015/03/27 17:59:33, Scott Hess wrote: > > ...
5 years, 9 months ago (2015-03-27 18:05:23 UTC) #36
pkotwicz
Sorry I did not respond to the comment. My concern was that the query to ...
5 years, 9 months ago (2015-03-27 18:42:10 UTC) #37
beaudoin
On 2015/03/27 18:42:10, pkotwicz wrote: > Sorry I did not respond to the comment. My ...
5 years, 9 months ago (2015-03-27 18:58:11 UTC) #38
Scott Hess - ex-Googler
On 2015/03/27 18:58:11, beaudoin wrote: > On 2015/03/27 18:42:10, pkotwicz wrote: > > Sorry I ...
5 years, 9 months ago (2015-03-27 19:03:48 UTC) #39
beaudoin
On 2015/03/27 19:03:48, Scott Hess wrote: > On 2015/03/27 18:58:11, beaudoin wrote: > > On ...
5 years, 9 months ago (2015-03-27 19:07:18 UTC) #40
Roger McFarlane (Chromium)
So, it doesn't actually need to be that bad. We only need to know how ...
5 years, 9 months ago (2015-03-27 19:16:52 UTC) #41
Scott Hess - ex-Googler
On 2015/03/27 19:16:52, Roger McFarlane (Chromium) wrote: > On passing the cull threshold, we do ...
5 years, 9 months ago (2015-03-27 19:27:27 UTC) #42
Roger McFarlane (Chromium)
On "what is a large icon?"... For our purposes (showing NTP recommendations as icons) large ...
5 years, 9 months ago (2015-03-27 20:20:30 UTC) #43
Roger McFarlane (Chromium)
> > The above statement will do a full table scan to generate a set ...
5 years, 9 months ago (2015-03-27 20:51:35 UTC) #44
Scott Hess - ex-Googler
On Fri, Mar 27, 2015 at 1:51 PM, Roger McFarlane <rogerm@chromium.org> wrote: >> The above ...
5 years, 9 months ago (2015-03-27 20:58:00 UTC) #45
Roger McFarlane (Chromium)
So, it sounds like everyone is supportive of this landing? Can I consider it approved? ...
5 years, 9 months ago (2015-03-27 21:09:19 UTC) #46
Scott Hess - ex-Googler
On 2015/03/27 21:09:19, Roger McFarlane (Chromium) wrote: > So, it sounds like everyone is supportive ...
5 years, 9 months ago (2015-03-27 21:56:07 UTC) #47
Roger McFarlane (Chromium)
https://codereview.chromium.org/1004373002/diff/140001/chrome/browser/history/thumbnail_database_unittest.cc File chrome/browser/history/thumbnail_database_unittest.cc (right): https://codereview.chromium.org/1004373002/diff/140001/chrome/browser/history/thumbnail_database_unittest.cc#newcode229 chrome/browser/history/thumbnail_database_unittest.cc:229: EXPECT_NE(0, id); On 2015/03/27 17:27:33, pkotwicz wrote: > Nit: ...
5 years, 9 months ago (2015-03-28 00:13:29 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004373002/160001
5 years, 9 months ago (2015-03-28 02:45:57 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/52489)
5 years, 9 months ago (2015-03-28 02:54:20 UTC) #53
Roger McFarlane (Chromium)
On 2015/03/28 02:54:20, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 9 months ago (2015-03-28 02:59:10 UTC) #54
sky
https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc#newcode736 components/history/core/browser/thumbnail_database.cc:736: bool ThumbnailDatabase::GetFaviconBitmapLastRequestedTime( Generally the history code has tried to ...
5 years, 8 months ago (2015-03-30 14:51:42 UTC) #55
Roger McFarlane (Chromium)
On 2015/03/30 14:51:42, sky wrote: > https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc > File components/history/core/browser/thumbnail_database.cc (right): > > https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc#newcode736 > ...
5 years, 8 months ago (2015-03-30 17:45:55 UTC) #56
sky
You could apply those arguments to other functions in the history classes. I prefer consistency. ...
5 years, 8 months ago (2015-03-30 18:28:20 UTC) #57
Roger McFarlane (Chromium)
Thanks, sky! Another look? https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1004373002/diff/160001/components/history/core/browser/thumbnail_database.cc#newcode736 components/history/core/browser/thumbnail_database.cc:736: bool ThumbnailDatabase::GetFaviconBitmapLastRequestedTime( On 2015/03/30 14:51:42, ...
5 years, 8 months ago (2015-03-31 18:25:50 UTC) #59
sky
Thanks, LGTM
5 years, 8 months ago (2015-03-31 23:42:15 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004373002/200001
5 years, 8 months ago (2015-04-01 02:21:41 UTC) #63
commit-bot: I haz the power
Committed patchset #7 (id:200001)
5 years, 8 months ago (2015-04-01 03:12:04 UTC) #64
commit-bot: I haz the power
5 years, 8 months ago (2015-04-01 03:12:56 UTC) #65
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/982ef2c11eb828b3c3728d1e42784d4b3056b251
Cr-Commit-Position: refs/heads/master@{#323176}

Powered by Google App Engine
This is Rietveld 408576698