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

Issue 1221523003: Add a SiteEngagementEvictionPolicy. (Closed)

Created:
5 years, 5 months ago by calamity
Modified:
3 years, 10 months ago
Reviewers:
michaeln, raymes, jam, jsbell
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@get_total_engagement_points
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a SiteEngagementEvictionPolicy. This CL adds a TemporaryStorageEvictionPolicy interface to QuotaManager which is implemented by a new SiteEngagementEvictionPolicy which picks the origin to evict based on its site engagement score and usage. This will then be integrated into the actual temporary storage eviction system in a follow-up patch. BUG=464234 TBR=jam@chromium.org Committed: https://crrev.com/508c6fa442424455b9746ba81bc4b9b59a059187 Cr-Commit-Position: refs/heads/master@{#345813}

Patch Set 1 #

Total comments: 33

Patch Set 2 : address most comments #

Patch Set 3 : refactor #

Total comments: 4

Patch Set 4 : refactor again #

Total comments: 14

Patch Set 5 : address comments #

Patch Set 6 : fix test #

Total comments: 4

Patch Set 7 : move static method into anonymous namespace #

Patch Set 8 : Extract SiteEngagementScoreProvider interface #

Total comments: 16

Patch Set 9 : address_comments_and_rebase #

Total comments: 10

Patch Set 10 : const ref #

Total comments: 4

Patch Set 11 : remove unnecessary destructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+379 lines, -56 lines) Patch
A chrome/browser/engagement/site_engagement_eviction_policy.h View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/engagement/site_engagement_eviction_policy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +117 lines, -0 lines 0 comments Download
A chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +128 lines, -0 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service.h View 1 2 3 4 5 6 7 4 chunks +15 lines, -8 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/quota/quota_temporary_storage_evictor_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M storage/browser/quota/quota_callbacks.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/quota/quota_manager.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -9 lines 0 comments Download
M storage/browser/quota/quota_manager.cc View 1 2 3 4 5 6 7 8 2 chunks +36 lines, -33 lines 0 comments Download
M storage/browser/quota/quota_temporary_storage_evictor.h View 1 chunk +1 line, -1 line 0 comments Download
M storage/browser/quota/quota_temporary_storage_evictor.cc View 2 chunks +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 41 (12 generated)
calamity
This one's more interesting.
5 years, 5 months ago (2015-07-07 06:53:47 UTC) #2
raymes
I just have to review the unittest still. https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode26 chrome/browser/engagement/site_engagement_eviction_policy.cc:26: for ...
5 years, 5 months ago (2015-07-08 04:43:29 UTC) #3
calamity
Okay, I'll do that big refactor so don't re-review this quite yet. I'll ping again ...
5 years, 5 months ago (2015-07-10 05:05:05 UTC) #4
calamity
Here's the majority of the changes. There will be a bit of tweaking for testing ...
5 years, 5 months ago (2015-07-14 06:21:30 UTC) #5
raymes
https://codereview.chromium.org/1221523003/diff/60001/chrome/browser/engagement/site_engagement_eviction_policy.h File chrome/browser/engagement/site_engagement_eviction_policy.h (right): https://codereview.chromium.org/1221523003/diff/60001/chrome/browser/engagement/site_engagement_eviction_policy.h#newcode24 chrome/browser/engagement/site_engagement_eviction_policy.h:24: class GetEvictionOriginTask { This should be a private class, ...
5 years, 5 months ago (2015-07-15 07:55:47 UTC) #7
calamity
Updated. https://codereview.chromium.org/1221523003/diff/60001/chrome/browser/engagement/site_engagement_eviction_policy.h File chrome/browser/engagement/site_engagement_eviction_policy.h (right): https://codereview.chromium.org/1221523003/diff/60001/chrome/browser/engagement/site_engagement_eviction_policy.h#newcode24 chrome/browser/engagement/site_engagement_eviction_policy.h:24: class GetEvictionOriginTask { On 2015/07/15 07:55:47, raymes wrote: ...
5 years, 5 months ago (2015-07-20 06:39:44 UTC) #8
raymes
https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode27 chrome/browser/engagement/site_engagement_eviction_policy.cc:27: int64 overuse = hmm overuse sort of implies that ...
5 years, 5 months ago (2015-07-21 03:16:01 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1221523003/120001
5 years, 5 months ago (2015-07-21 04:57:03 UTC) #12
calamity
https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode27 chrome/browser/engagement/site_engagement_eviction_policy.cc:27: int64 overuse = On 2015/07/21 03:16:00, raymes wrote: > ...
5 years, 5 months ago (2015-07-21 04:57:09 UTC) #13
calamity
+michaeln for storage/ OWNERS.
5 years, 5 months ago (2015-07-21 04:58:54 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/46574)
5 years, 5 months ago (2015-07-21 05:15:59 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1221523003/140001
5 years, 5 months ago (2015-07-21 06:59:21 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/30122)
5 years, 5 months ago (2015-07-21 07:49:44 UTC) #21
raymes
lgtm https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode55 chrome/browser/engagement/site_engagement_eviction_policy.cc:55: return engagement_service_->GetTotalEngagementPoints(); I still think we should eventually ...
5 years, 5 months ago (2015-07-21 09:22:20 UTC) #22
calamity
https://codereview.chromium.org/1221523003/diff/140001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/140001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode58 chrome/browser/engagement/site_engagement_eviction_policy.cc:58: GURL SiteEngagementEvictionPolicy::GetSiteEngagementEvictionOriginOnUIThread( On 2015/07/21 09:22:20, raymes wrote: > nit: ...
5 years, 5 months ago (2015-07-22 01:57:38 UTC) #23
calamity
Extracted interface.
5 years, 5 months ago (2015-07-23 01:09:11 UTC) #24
michaeln
Doing this by way of an abstraction to pick the victim is great. Please see ...
5 years, 5 months ago (2015-07-23 02:22:32 UTC) #25
michaeln
https://codereview.chromium.org/1221523003/diff/180001/storage/browser/quota/quota_manager.h File storage/browser/quota/quota_manager.h (right): https://codereview.chromium.org/1221523003/diff/180001/storage/browser/quota/quota_manager.h#newcode75 storage/browser/quota/quota_manager.h:75: class STORAGE_EXPORT TemporaryStorageEvictionPolicy { I'd vote for a simpler ...
5 years, 5 months ago (2015-07-23 02:26:19 UTC) #26
calamity
https://codereview.chromium.org/1221523003/diff/140001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/140001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode54 chrome/browser/engagement/site_engagement_eviction_policy.cc:54: base::Bind(&ReplyWithEvictionOrigin, callback)); On 2015/07/23 02:22:32, michaeln wrote: > would ...
5 years, 4 months ago (2015-07-28 01:08:00 UTC) #27
michaeln
@jsbell, ptal at the quota computations https://codereview.chromium.org/1221523003/diff/180001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/180001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode42 chrome/browser/engagement/site_engagement_eviction_policy.cc:42: // The heuristic ...
5 years, 4 months ago (2015-07-29 00:46:46 UTC) #29
calamity
https://codereview.chromium.org/1221523003/diff/200001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1221523003/diff/200001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode27 chrome/browser/engagement/site_engagement_eviction_policy.cc:27: return score * quota_per_point; On 2015/07/29 00:46:45, michaeln wrote: ...
5 years, 4 months ago (2015-07-29 05:00:36 UTC) #30
jsbell
lgtm
5 years, 4 months ago (2015-08-21 04:28:16 UTC) #31
jsbell
What's the plan for landing this? It'd be nice to get it in and iterate, ...
5 years, 4 months ago (2015-08-24 18:04:53 UTC) #32
calamity
On 2015/08/24 18:04:53, jsbell wrote: > What's the plan for landing this? It'd be nice ...
5 years, 4 months ago (2015-08-25 02:43:43 UTC) #33
michaeln
lgtm i'm pretty confident that delegating to an evictionhandler is a good thing, i'm less ...
5 years, 3 months ago (2015-08-26 23:32:37 UTC) #34
calamity
TBRing jam for content/ test affected by name changes. https://codereview.chromium.org/1221523003/diff/220001/chrome/browser/engagement/site_engagement_service.h File chrome/browser/engagement/site_engagement_service.h (right): https://codereview.chromium.org/1221523003/diff/220001/chrome/browser/engagement/site_engagement_service.h#newcode90 chrome/browser/engagement/site_engagement_service.h:90: ...
5 years, 3 months ago (2015-08-27 05:05:01 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1221523003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1221523003/240001
5 years, 3 months ago (2015-08-27 05:05:15 UTC) #39
commit-bot: I haz the power
Committed patchset #11 (id:240001)
5 years, 3 months ago (2015-08-27 06:29:19 UTC) #40
commit-bot: I haz the power
5 years, 3 months ago (2015-08-27 06:30:38 UTC) #41
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/508c6fa442424455b9746ba81bc4b9b59a059187
Cr-Commit-Position: refs/heads/master@{#345813}

Powered by Google App Engine
This is Rietveld 408576698