Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/time/default_clock.h" | 10 #include "base/time/default_clock.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 public SiteEngagementScoreProvider { | 107 public SiteEngagementScoreProvider { |
| 108 public: | 108 public: |
| 109 static SiteEngagementService* Get(Profile* profile); | 109 static SiteEngagementService* Get(Profile* profile); |
| 110 | 110 |
| 111 // Returns whether or not the SiteEngagementService is enabled. | 111 // Returns whether or not the SiteEngagementService is enabled. |
| 112 static bool IsEnabled(); | 112 static bool IsEnabled(); |
| 113 | 113 |
| 114 explicit SiteEngagementService(Profile* profile); | 114 explicit SiteEngagementService(Profile* profile); |
| 115 ~SiteEngagementService() override; | 115 ~SiteEngagementService() override; |
| 116 | 116 |
| 117 // Update the karma score of the origin matching |url| for user navigation. | 117 // Update the karma score of the origin matching |url| for user navigation. |
|
calamity
2015/09/11 07:19:56
Update.
dominickn
2015/09/11 08:03:38
Done.
| |
| 118 void HandleNavigation(const GURL& url); | 118 void HandleUserInput(const GURL& url); |
| 119 | 119 |
| 120 // Overridden from SiteEngagementScoreProvider: | 120 // Overridden from SiteEngagementScoreProvider: |
| 121 int GetScore(const GURL& url) override; | 121 int GetScore(const GURL& url) override; |
| 122 int GetTotalEngagementPoints() override; | 122 int GetTotalEngagementPoints() override; |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 Profile* profile_; | 125 Profile* profile_; |
| 126 | 126 |
| 127 // The clock used to vend times. | 127 // The clock used to vend times. |
| 128 base::DefaultClock clock_; | 128 base::DefaultClock clock_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(SiteEngagementService); | 130 DISALLOW_COPY_AND_ASSIGN(SiteEngagementService); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_ | 133 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_H_ |
| OLD | NEW |