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

Unified Diff: chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc

Issue 1376143003: Revert of Implement a site engagement score based on time-on-site. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc
diff --git a/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc b/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc
index 733c5aa6d3b02725439a3b1017cf3ef5809d1e99..49757f2b67911c57eac4425e70bc17e4c0c25fe6 100644
--- a/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc
+++ b/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc
@@ -19,23 +19,21 @@
virtual ~TestSiteEngagementScoreProvider() {}
- double GetScore(const GURL& url) override {
- return engagement_score_map_[url];
- }
+ int GetScore(const GURL& url) override { return engagement_score_map_[url]; }
- double GetTotalEngagementPoints() override {
- double total = 0;
+ int GetTotalEngagementPoints() override {
+ int total = 0;
for (const auto& site : engagement_score_map_)
total += site.second;
return total;
}
- void SetScore(const GURL& origin, double score) {
+ void SetScore(const GURL& origin, int score) {
engagement_score_map_[origin] = score;
}
private:
- std::map<GURL, double> engagement_score_map_;
+ std::map<GURL, int> engagement_score_map_;
DISALLOW_COPY_AND_ASSIGN(TestSiteEngagementScoreProvider);
};
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698