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

Unified Diff: chrome/browser/android/ntp/content_suggestions_notification_helper.h

Issue 2626643002: Stop showing notifications if they're ignored (Closed)
Patch Set: Formatting, explicit Created 3 years, 11 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/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..434e77af083245f4d19a1c497854613da9f31ac3 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,13 @@ class ContentSuggestionsNotificationHelper {
base::Time timeout_at);
static void HideAllNotifications();
+ // 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);
};

Powered by Google App Engine
This is Rietveld 408576698