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

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

Issue 2748103011: Grant origins engagement for having interactions on their notifications. (Closed)
Patch Set: Created 3 years, 9 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
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 c97eb4abfa7bfa1aaf3887eb7886d66ced363286..93792b64b0a839cc00127362db866a9327f2aad6 100644
--- a/chrome/browser/engagement/site_engagement_service.h
+++ b/chrome/browser/engagement/site_engagement_service.h
@@ -137,6 +137,8 @@ class SiteEngagementService : public KeyedService,
double GetTotalEngagementPoints() const override;
private:
+ // TODO(dominickn): remove this friend when we have notification observers.
+ friend class PlatformNotificationServiceImpl;
friend class SiteEngagementObserver;
friend class SiteEngagementServiceAndroid;
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, CheckHistograms);
@@ -151,6 +153,8 @@ class SiteEngagementService : public KeyedService,
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, GetMedianEngagement);
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, GetTotalNavigationPoints);
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, GetTotalUserInputPoints);
+ FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest,
+ GetTotalNotificationPoints);
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, RestrictedToHTTPAndHTTPS);
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, LastShortcutLaunch);
FRIEND_TEST_ALL_PREFIXES(SiteEngagementServiceTest, NotificationPermission);
@@ -231,6 +235,9 @@ class SiteEngagementService : public KeyedService,
void HandleUserInput(content::WebContents* web_contents,
SiteEngagementMetrics::EngagementType type);
+ // Update the engagement score of |url| for a notification interaction.
+ void HandleNotificationInteraction(const GURL& url);
+
// Called if |url| changes to |level| engagement, and informs every Helper of
// the change.
void SendLevelChangeToHelpers(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698