Index: chrome/browser/android/ntp/content_suggestions_notification_helper.h |
diff --git a/chrome/browser/android/ntp/content_suggestions_notification_helper.h b/chrome/browser/android/ntp/content_suggestions_notification_helper.h |
index e9c7d93c569f6d100e86ea938816e8b00cffba53..05f54b1e73ef53cc196ce92251293e96427ab703 100644 |
--- a/chrome/browser/android/ntp/content_suggestions_notification_helper.h |
+++ b/chrome/browser/android/ntp/content_suggestions_notification_helper.h |
@@ -5,6 +5,7 @@ |
#ifndef CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ |
#define CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ |
+#include <jni.h> |
#include <string> |
#include "base/macros.h" |
@@ -12,6 +13,8 @@ |
#include "base/time/time.h" |
#include "url/gurl.h" |
+class Profile; |
+ |
namespace gfx { |
class Image; |
} // namespace gfx |
@@ -20,7 +23,6 @@ namespace ntp_snippets { |
class ContentSuggestionsNotificationHelper { |
public: |
- static void OpenURL(const GURL& url); |
static void SendNotification(const GURL& url, |
const base::string16& title, |
const base::string16& text, |
@@ -28,6 +30,22 @@ class ContentSuggestionsNotificationHelper { |
base::Time timeout_at); |
static void HideAllNotifications(); |
+ // Moves metrics tracked in Java into native histograms. Should be called when |
+ // the native library starts up, to capture any actions that were taken since |
+ // the last time it was running. (Harmless to call more often, though) |
+ // |
+ // Also updates the "consecutive ignored" preference, which is computed from |
+ // the actions taken on notifications, and maybe the "opt outs" metric, which |
+ // is computed in turn from that. |
+ static void FlushCachedMetrics(); |
+ |
+ // True if the user has ignored enough notifications that we no longer think |
+ // that the user is interested in them. |
+ static bool IsDisabledForProfile(Profile* profile); |
+ |
+ // Registers JNI methods. |
+ static bool Register(JNIEnv* env); |
+ |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSuggestionsNotificationHelper); |
}; |