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

Unified Diff: chrome/browser/engagement/site_engagement_eviction_policy.h

Issue 1343273003: Integrate SiteEngagementEvictionPolicy with QuotaManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_eviction_policy
Patch Set: export Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/engagement/site_engagement_eviction_policy.h
diff --git a/chrome/browser/engagement/site_engagement_eviction_policy.h b/chrome/browser/engagement/site_engagement_eviction_policy.h
index 470b0ec33d2e617ca8527dedc75540081b74f7e0..680b19663c1c75baf2c73a1693e48876efb4e1ce 100644
--- a/chrome/browser/engagement/site_engagement_eviction_policy.h
+++ b/chrome/browser/engagement/site_engagement_eviction_policy.h
@@ -23,26 +23,32 @@ class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy {
public:
explicit SiteEngagementEvictionPolicy(
content::BrowserContext* browser_context);
- virtual ~SiteEngagementEvictionPolicy();
+ ~SiteEngagementEvictionPolicy() override;
// Overridden from storage::QuotaEvictionPolicy:
- void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>&
+ void GetEvictionOrigin(scoped_ptr<QuotaEvictionPolicy::Info> info,
+ const scoped_refptr<storage::SpecialStoragePolicy>&
special_storage_policy,
- const std::map<GURL, int64>& usage_map,
- int64 global_quota,
const storage::GetOriginCallback& callback) override;
+ bool NeedsOriginUsageMap() override;
+ bool NeedsGlobalQuota() override;
private:
friend class SiteEngagementEvictionPolicyTest;
+ friend class SiteEngagementEvictionPolicyWithQuotaManagerTest;
- static GURL CalculateEvictionOrigin(
+ static void SetSiteEngagementScoreProviderCallbackForTests(
+ base::Callback<SiteEngagementScoreProvider*(content::BrowserContext*)>*
+ callback);
+
+ static GURL CalculateEvictionOriginForTests(
const scoped_refptr<storage::SpecialStoragePolicy>&
special_storage_policy,
SiteEngagementScoreProvider* score_provider,
const std::map<GURL, int64>& usage_map,
int64 global_quota);
- content::BrowserContext* browser_context_;
+ content::BrowserContext* const browser_context_;
DISALLOW_COPY_AND_ASSIGN(SiteEngagementEvictionPolicy);
};

Powered by Google App Engine
This is Rietveld 408576698