| Index: chrome/browser/engagement/site_engagement_score.h
|
| diff --git a/chrome/browser/engagement/site_engagement_score.h b/chrome/browser/engagement/site_engagement_score.h
|
| index 358f97d6cf79dfcee6ac4703bc3b7c15b3654758..7ce40e9b12e0b2cf6be5e72cf26a96fc7a8658e5 100644
|
| --- a/chrome/browser/engagement/site_engagement_score.h
|
| +++ b/chrome/browser/engagement/site_engagement_score.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/macros.h"
|
| #include "base/time/time.h"
|
| #include "base/values.h"
|
| +#include "chrome/browser/engagement/site_engagement_details.mojom.h"
|
| #include "third_party/WebKit/public/platform/site_engagement.mojom.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -137,7 +138,15 @@ class SiteEngagementScore {
|
| // possible score. Decays the score if it has not been updated recently
|
| // enough.
|
| void AddPoints(double points);
|
| - double GetScore() const;
|
| +
|
| + // Returns the total score, taking into account the base, bonus and maximum
|
| + // values.
|
| + double GetTotal() const;
|
| +
|
| + // Returns a structure containing the origin URL and score, and details
|
| + // of the base and bonus scores. Note that the |score| is limited to
|
| + // kMaxPoints, while the detailed scores are returned raw.
|
| + mojom::SiteEngagementDetails GetDetails() const;
|
|
|
| // Writes the values in this score into |settings_map_|.
|
| void Commit();
|
| @@ -196,8 +205,11 @@ class SiteEngagementScore {
|
| // Determine the score, accounting for any decay.
|
| double DecayedScore() const;
|
|
|
| - // Determine any score bonus from having installed shortcuts.
|
| - double BonusScore() const;
|
| + // Determine bonus from being installed, and having been launched recently..
|
| + double BonusIfShortcutLaunched() const;
|
| +
|
| + // Determine bonus from having been granted notifications permission.
|
| + double BonusIfHasNotifications() const;
|
|
|
| // Updates the content settings dictionary |score_dict| with the current score
|
| // fields. Returns true if |score_dict| changed, otherwise return false.
|
|
|