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

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: address_comments Created 5 years, 2 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..c74c0d5cfe5d6a42955953b1fcb258b6d6c5f7e9 100644
--- a/chrome/browser/engagement/site_engagement_eviction_policy.h
+++ b/chrome/browser/engagement/site_engagement_eviction_policy.h
@@ -23,7 +23,7 @@ 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>&
@@ -34,15 +34,20 @@ class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy {
private:
friend class SiteEngagementEvictionPolicyTest;
+ friend class SiteEngagementEvictionPolicyWithQuotaManagerTest;
- static GURL CalculateEvictionOrigin(
+ static void SetSiteEngagementScoreProviderCallbackForTests(
+ base::Callback<SiteEngagementScoreProvider*(content::BrowserContext*)>*
michaeln 2015/10/12 23:36:26 usually we pass these by const ref
calamity 2015/10/13 08:34:40 Removed since the integration test w/ QuotaManager
+ 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