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

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

Issue 1207383006: Add GetTotalEngagementPoints to SiteEngagementService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 5 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_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/engagement/site_engagement_service.h
diff --git a/chrome/browser/engagement/site_engagement_service.h b/chrome/browser/engagement/site_engagement_service.h
index 1eaa430850e0810afdc995386137b20648d16ab8..f5494de945bdf42c309ecafc646cae6e8bbf052e 100644
--- a/chrome/browser/engagement/site_engagement_service.h
+++ b/chrome/browser/engagement/site_engagement_service.h
@@ -46,15 +46,15 @@ class SiteEngagementScore {
// responsibility of the caller to make sure |clock| outlives this
// SiteEngagementScore.
SiteEngagementScore(base::Clock* clock,
- const base::DictionaryValue& settings);
+ const base::DictionaryValue& score_dict);
~SiteEngagementScore();
double Score() const;
void AddPoints(double points);
- // Updates the content settings dictionary |settings| with the current score
- // fields. Returns true if |settings| changed, otherwise return false.
- bool UpdateSettings(base::DictionaryValue* settings);
+ // Updates the content settings dictionary |score_dict| with the current score
+ // fields. Returns true if |score_dict| changed, otherwise return false.
+ bool UpdateScoreDict(base::DictionaryValue* score_dict);
private:
friend class SiteEngagementScoreTest;
@@ -111,6 +111,9 @@ class SiteEngagementService : public KeyedService {
// origin for this URL.
int GetScore(const GURL& url);
+ // Returns the sum of engagement points awarded to all sites.
+ int GetTotalEngagementPoints();
+
private:
Profile* profile_;
« no previous file with comments | « no previous file | chrome/browser/engagement/site_engagement_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698