OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ | 5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ |
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ | 6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy { | 22 class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy { |
23 public: | 23 public: |
24 explicit SiteEngagementEvictionPolicy( | 24 explicit SiteEngagementEvictionPolicy( |
25 content::BrowserContext* browser_context); | 25 content::BrowserContext* browser_context); |
26 ~SiteEngagementEvictionPolicy() override; | 26 ~SiteEngagementEvictionPolicy() override; |
27 | 27 |
28 // Overridden from storage::QuotaEvictionPolicy: | 28 // Overridden from storage::QuotaEvictionPolicy: |
29 void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>& | 29 void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>& |
30 special_storage_policy, | 30 special_storage_policy, |
| 31 const std::set<GURL>& exceptions, |
31 const std::map<GURL, int64>& usage_map, | 32 const std::map<GURL, int64>& usage_map, |
32 int64 global_quota, | 33 int64 global_quota, |
33 const storage::GetOriginCallback& callback) override; | 34 const storage::GetOriginCallback& callback) override; |
34 | 35 |
35 private: | 36 private: |
36 friend class SiteEngagementEvictionPolicyTest; | 37 friend class SiteEngagementEvictionPolicyTest; |
37 | 38 |
38 static GURL CalculateEvictionOriginForTests( | 39 static GURL CalculateEvictionOriginForTests( |
39 const scoped_refptr<storage::SpecialStoragePolicy>& | 40 const scoped_refptr<storage::SpecialStoragePolicy>& |
40 special_storage_policy, | 41 special_storage_policy, |
41 SiteEngagementScoreProvider* score_provider, | 42 SiteEngagementScoreProvider* score_provider, |
| 43 const std::set<GURL>& exceptions, |
42 const std::map<GURL, int64>& usage_map, | 44 const std::map<GURL, int64>& usage_map, |
43 int64 global_quota); | 45 int64 global_quota); |
44 | 46 |
45 content::BrowserContext* const browser_context_; | 47 content::BrowserContext* const browser_context_; |
46 | 48 |
47 DISALLOW_COPY_AND_ASSIGN(SiteEngagementEvictionPolicy); | 49 DISALLOW_COPY_AND_ASSIGN(SiteEngagementEvictionPolicy); |
48 }; | 50 }; |
49 | 51 |
50 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ | 52 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ |
OLD | NEW |