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

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

Issue 1077063002: Implement a basic Site Engagement Score service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix stuff Created 5 years, 8 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_helper.h
diff --git a/chrome/browser/engagement/site_engagement_helper.h b/chrome/browser/engagement/site_engagement_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..d2fdc25ccaeae7d86aa15726dd0a105180e96971
--- /dev/null
+++ b/chrome/browser/engagement/site_engagement_helper.h
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
+#define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
+
+#include "base/macros.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+namespace content {
+class WebContents;
+}
+
+class GURL;
+
+class SiteEngagementHelper
raymes 2015/04/16 01:13:55 nit: Could you add a comment for this class?
benwells 2015/04/16 05:15:27 Done.
+ : public content::WebContentsObserver,
+ public content::WebContentsUserData<SiteEngagementHelper> {
+ public:
+ ~SiteEngagementHelper() override;
+
raymes 2015/04/16 01:13:55 nit: // WebContentsObserver overrides.
benwells 2015/04/16 05:15:27 Done. I also made it private.
+ void DidStartNavigationToPendingEntry(
+ const GURL& url,
+ content::NavigationController::ReloadType reload_type) override;
+
+ private:
+ explicit SiteEngagementHelper(content::WebContents* web_contents);
+ friend class content::WebContentsUserData<SiteEngagementHelper>;
+
+ DISALLOW_COPY_AND_ASSIGN(SiteEngagementHelper);
+};
+
+#endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698