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

Side by Side 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 unified diff | Download patch
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_ 6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 explicit SiteEngagementService(Profile* profile); 104 explicit SiteEngagementService(Profile* profile);
105 ~SiteEngagementService() override; 105 ~SiteEngagementService() override;
106 106
107 // Update the karma score of the origin matching |url| for user navigation. 107 // Update the karma score of the origin matching |url| for user navigation.
108 void HandleNavigation(const GURL& url); 108 void HandleNavigation(const GURL& url);
109 109
110 // Returns a non-negative integer representing the engagement score of the 110 // Returns a non-negative integer representing the engagement score of the
111 // origin for this URL. 111 // origin for this URL.
112 int GetScore(const GURL& url); 112 int GetScore(const GURL& url);
113 113
114 // Returns the sum of engagement points awarded to all sites.
115 int GetTotalEngagementPoints();
116
114 private: 117 private:
115 Profile* profile_; 118 Profile* profile_;
116 119
117 // The clock used to vend times. 120 // The clock used to vend times.
118 base::DefaultClock clock_; 121 base::DefaultClock clock_;
119 122
120 DISALLOW_COPY_AND_ASSIGN(SiteEngagementService); 123 DISALLOW_COPY_AND_ASSIGN(SiteEngagementService);
121 }; 124 };
122 125
123 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_ 126 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698