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

Side by Side Diff: chrome/browser/engagement/site_engagement_eviction_policy.h

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_eviction_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h>
9
8 #include <map> 10 #include <map>
9 11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
13 #include "storage/browser/quota/quota_manager.h" 15 #include "storage/browser/quota/quota_manager.h"
14 #include "url/gurl.h" 16 #include "url/gurl.h"
15 17
16 namespace content { 18 namespace content {
17 class BrowserContext; 19 class BrowserContext;
18 } 20 }
19 21
20 class SiteEngagementScoreProvider; 22 class SiteEngagementScoreProvider;
21 23
22 class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy { 24 class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy {
23 public: 25 public:
24 static bool IsEnabled(); 26 static bool IsEnabled();
25 27
26 explicit SiteEngagementEvictionPolicy( 28 explicit SiteEngagementEvictionPolicy(
27 content::BrowserContext* browser_context); 29 content::BrowserContext* browser_context);
28 ~SiteEngagementEvictionPolicy() override; 30 ~SiteEngagementEvictionPolicy() override;
29 31
30 // Overridden from storage::QuotaEvictionPolicy: 32 // Overridden from storage::QuotaEvictionPolicy:
31 void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>& 33 void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>&
32 special_storage_policy, 34 special_storage_policy,
33 const std::set<GURL>& exceptions, 35 const std::set<GURL>& exceptions,
34 const std::map<GURL, int64>& usage_map, 36 const std::map<GURL, int64_t>& usage_map,
35 int64 global_quota, 37 int64_t global_quota,
36 const storage::GetOriginCallback& callback) override; 38 const storage::GetOriginCallback& callback) override;
37 39
38 private: 40 private:
39 friend class SiteEngagementEvictionPolicyTest; 41 friend class SiteEngagementEvictionPolicyTest;
40 42
41 static GURL CalculateEvictionOriginForTests( 43 static GURL CalculateEvictionOriginForTests(
42 const scoped_refptr<storage::SpecialStoragePolicy>& 44 const scoped_refptr<storage::SpecialStoragePolicy>&
43 special_storage_policy, 45 special_storage_policy,
44 SiteEngagementScoreProvider* score_provider, 46 SiteEngagementScoreProvider* score_provider,
45 const std::set<GURL>& exceptions, 47 const std::set<GURL>& exceptions,
46 const std::map<GURL, int64>& usage_map, 48 const std::map<GURL, int64_t>& usage_map,
47 int64 global_quota); 49 int64_t global_quota);
48 50
49 content::BrowserContext* const browser_context_; 51 content::BrowserContext* const browser_context_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(SiteEngagementEvictionPolicy); 53 DISALLOW_COPY_AND_ASSIGN(SiteEngagementEvictionPolicy);
52 }; 54 };
53 55
54 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ 56 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_eviction_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698