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

Unified Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 2868042: Backend changes for notifications content settings. (Closed)
Patch Set: '' Created 10 years, 5 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/notifications/desktop_notification_service.h
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index e2be439cbdcbbfbe250a264741ab2ccb68073f3d..3f97425003bc76c3a7eb08a29eb6b40cb786fb44 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -86,9 +86,26 @@ class DesktopNotificationService : public NotificationObserver {
static string16 CreateDataUrl(const GURL& icon_url, const string16& title,
const string16& body);
+ // The default content setting determines how to handle origins that haven't
+ // been allowed or denied yet.
ContentSetting GetDefaultContentSetting();
void SetDefaultContentSetting(ContentSetting setting);
+ // Returns all origins that explicitly have been allowed.
+ std::vector<GURL> GetAllowedOrigins();
+
+ // Returns all origins that explicitly have been denied.
+ std::vector<GURL> GetBlockedOrigins();
+
+ // Removes an origin from the "explicitly allowed" set.
+ void ResetAllowedOrigin(const GURL& origin);
+
+ // Removes an origin from the "explicitly denied" set.
+ void ResetBlockedOrigin(const GURL& origin);
+
+ // Clears the sets of explicitly allowed and denied origins.
+ void ResetAllOrigins();
+
static void RegisterUserPrefs(PrefService* user_prefs);
private:
void InitPrefs();
@@ -103,6 +120,8 @@ class DesktopNotificationService : public NotificationObserver {
// itself when dealing with extensions.
std::wstring DisplayNameForOrigin(const GURL& origin);
+ ContentSetting GetContentSetting(const GURL& origin);
+
// The profile which owns this object.
Profile* profile_;
« no previous file with comments | « chrome/app/resources/locale_settings.grd ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698