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

Issue 1343273003: Integrate SiteEngagementEvictionPolicy with QuotaManager. (Closed)

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

Description

Integrate SiteEngagementEvictionPolicy with QuotaManager. This CL hooks the SiteEngagementEvictionPolicy to get its usage map and global quota values from the QuotaManager and then sending them to the UI thread for calculation. This CL also adds a test that verifies that this plumbing completes as expected. Actually instantiating the SiteEngagementEvictionPolicy in the business codepath will be implemented at a later date. BUG=464234 Committed: https://crrev.com/a36c8d59097dae332974262d1fae64aee93bae6e Cr-Commit-Position: refs/heads/master@{#353961}

Patch Set 1 #

Total comments: 18

Patch Set 2 : address comments #

Patch Set 3 : address comments #

Patch Set 4 : rebase #

Total comments: 19

Patch Set 5 : address comments #

Total comments: 2

Patch Set 6 : #

Total comments: 2

Patch Set 7 : refactor quotamanager info retrieval into a quota task #

Patch Set 8 : fix test #

Patch Set 9 : export #

Total comments: 15

Patch Set 10 : rebase #

Patch Set 11 : address_comments #

Total comments: 7

Patch Set 12 : address comments #

Total comments: 8

Patch Set 13 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -61 lines) Patch
M chrome/browser/engagement/site_engagement_eviction_policy.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/engagement/site_engagement_eviction_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/quota/quota_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +69 lines, -42 lines 0 comments Download
M content/browser/quota/quota_temporary_storage_evictor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/quota/client_usage_tracker.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M storage/browser/quota/client_usage_tracker.cc View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M storage/browser/quota/quota_manager.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +18 lines, -2 lines 0 comments Download
M storage/browser/quota/quota_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +40 lines, -4 lines 0 comments Download
M storage/browser/quota/quota_temporary_storage_evictor.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M storage/browser/quota/usage_tracker.h View 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/quota/usage_tracker.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 32 (11 generated)
calamity
5 years, 3 months ago (2015-09-16 07:22:28 UTC) #2
raymes
https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode98 chrome/browser/engagement/site_engagement_eviction_policy.cc:98: CR_DEFINE_STATIC_LOCAL( I think this should only be called from ...
5 years, 3 months ago (2015-09-17 04:14:31 UTC) #3
calamity
https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode98 chrome/browser/engagement/site_engagement_eviction_policy.cc:98: CR_DEFINE_STATIC_LOCAL( On 2015/09/17 04:14:30, raymes wrote: > I think ...
5 years, 3 months ago (2015-09-17 06:06:46 UTC) #5
raymes
lgtm https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc File chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc (right): https://codereview.chromium.org/1343273003/diff/1/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc#newcode147 chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc:147: EXPECT_FALSE(eviction_origin().is_empty()); I think it would be nice to ...
5 years, 3 months ago (2015-09-17 06:58:21 UTC) #6
calamity
+michaeln for storage/ OWNERS. FYI, followup CLs exist at https://codereview.chromium.org/1355793002/ and https://codereview.chromium.org/1354543002/ for context. I'll ...
5 years, 3 months ago (2015-09-21 03:27:51 UTC) #8
raymes
I reviewed the storage stuff a bit and added some more comments. https://codereview.chromium.org/1343273003/diff/80001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc ...
5 years, 3 months ago (2015-09-22 06:08:49 UTC) #9
calamity
https://codereview.chromium.org/1343273003/diff/80001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1343273003/diff/80001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode92 chrome/browser/engagement/site_engagement_eviction_policy.cc:92: : GetSiteEngagementService(browser_context); On 2015/09/22 06:08:48, raymes wrote: > nit: ...
5 years, 3 months ago (2015-09-23 01:46:25 UTC) #11
raymes
lgtm https://codereview.chromium.org/1343273003/diff/80001/storage/browser/quota/client_usage_tracker.cc File storage/browser/quota/client_usage_tracker.cc (right): https://codereview.chromium.org/1343273003/diff/80001/storage/browser/quota/client_usage_tracker.cc#newcode176 storage/browser/quota/client_usage_tracker.cc:176: void ClientUsageTracker::GetUsageForCachedOrigins( On 2015/09/23 01:46:24, calamity wrote: > ...
5 years, 3 months ago (2015-09-23 01:56:14 UTC) #12
calamity
https://codereview.chromium.org/1343273003/diff/80001/storage/browser/quota/client_usage_tracker.cc File storage/browser/quota/client_usage_tracker.cc (right): https://codereview.chromium.org/1343273003/diff/80001/storage/browser/quota/client_usage_tracker.cc#newcode176 storage/browser/quota/client_usage_tracker.cc:176: void ClientUsageTracker::GetUsageForCachedOrigins( On 2015/09/23 01:56:14, raymes wrote: > On ...
5 years, 3 months ago (2015-09-23 02:15:57 UTC) #13
michaeln
https://codereview.chromium.org/1343273003/diff/140001/storage/browser/quota/quota_manager.h File storage/browser/quota/quota_manager.h (right): https://codereview.chromium.org/1343273003/diff/140001/storage/browser/quota/quota_manager.h#newcode255 storage/browser/quota/quota_manager.h:255: UsageTracker* GetUsageTracker(StorageType type) const; I don't think we should ...
5 years, 3 months ago (2015-09-23 20:33:50 UTC) #14
calamity
> File storage/browser/quota/quota_manager.h (right): > > https://codereview.chromium.org/1343273003/diff/140001/storage/browser/quota/quota_manager.h#newcode255 > storage/browser/quota/quota_manager.h:255: UsageTracker* > GetUsageTracker(StorageType type) const; > ...
5 years, 3 months ago (2015-09-24 04:14:26 UTC) #15
calamity
https://codereview.chromium.org/1343273003/diff/140001/storage/browser/quota/quota_manager.h File storage/browser/quota/quota_manager.h (right): https://codereview.chromium.org/1343273003/diff/140001/storage/browser/quota/quota_manager.h#newcode255 storage/browser/quota/quota_manager.h:255: UsageTracker* GetUsageTracker(StorageType type) const; On 2015/09/23 20:33:50, michaeln wrote: ...
5 years, 2 months ago (2015-09-29 07:09:16 UTC) #16
michaeln
https://codereview.chromium.org/1343273003/diff/220001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1343273003/diff/220001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode116 chrome/browser/engagement/site_engagement_eviction_policy.cc:116: info->origin_usage_map, info->global_quota), I thought you might have created the ...
5 years, 2 months ago (2015-10-06 00:35:09 UTC) #18
calamity
https://codereview.chromium.org/1343273003/diff/220001/chrome/browser/engagement/site_engagement_eviction_policy.cc File chrome/browser/engagement/site_engagement_eviction_policy.cc (right): https://codereview.chromium.org/1343273003/diff/220001/chrome/browser/engagement/site_engagement_eviction_policy.cc#newcode116 chrome/browser/engagement/site_engagement_eviction_policy.cc:116: info->origin_usage_map, info->global_quota), On 2015/10/06 00:35:09, michaeln wrote: > I ...
5 years, 2 months ago (2015-10-07 02:42:46 UTC) #21
michaeln
https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy.h File chrome/browser/engagement/site_engagement_eviction_policy.h (right): https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy.h#newcode40 chrome/browser/engagement/site_engagement_eviction_policy.h:40: base::Callback<SiteEngagementScoreProvider*(content::BrowserContext*)>* usually we pass these by const ref https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc ...
5 years, 2 months ago (2015-10-12 23:36:26 UTC) #22
calamity
https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy.h File chrome/browser/engagement/site_engagement_eviction_policy.h (right): https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy.h#newcode40 chrome/browser/engagement/site_engagement_eviction_policy.h:40: base::Callback<SiteEngagementScoreProvider*(content::BrowserContext*)>* On 2015/10/12 23:36:26, michaeln wrote: > usually we ...
5 years, 2 months ago (2015-10-13 08:34:40 UTC) #24
michaeln
lgtm, thnx for cleaning up the tests https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc File chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc (right): https://codereview.chromium.org/1343273003/diff/300001/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc#newcode66 chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc:66: class SiteEngagementEvictionPolicyWithQuotaManagerTest ...
5 years, 2 months ago (2015-10-13 20:13:39 UTC) #25
calamity
https://codereview.chromium.org/1343273003/diff/340001/content/browser/quota/quota_manager_unittest.cc File content/browser/quota/quota_manager_unittest.cc (right): https://codereview.chromium.org/1343273003/diff/340001/content/browser/quota/quota_manager_unittest.cc#newcode77 content/browser/quota/quota_manager_unittest.cc:77: callback.Run(GURL("http://bar.com/")); On 2015/10/13 20:13:39, michaeln wrote: > maybe make ...
5 years, 2 months ago (2015-10-14 04:49:16 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1343273003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1343273003/360001
5 years, 2 months ago (2015-10-14 04:50:24 UTC) #29
commit-bot: I haz the power
Committed patchset #13 (id:360001)
5 years, 2 months ago (2015-10-14 05:00:42 UTC) #30
commit-bot: I haz the power
5 years, 2 months ago (2015-10-14 05:01:41 UTC) #31
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/a36c8d59097dae332974262d1fae64aee93bae6e
Cr-Commit-Position: refs/heads/master@{#353961}

Powered by Google App Engine
This is Rietveld 408576698