Index: chrome/browser/notifications/desktop_notification_profile_util.h |
diff --git a/chrome/browser/notifications/desktop_notification_profile_util.h b/chrome/browser/notifications/desktop_notification_profile_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff6f90e36c6691e7a3fdd41a09a4c77d4ea3565e |
--- /dev/null |
+++ b/chrome/browser/notifications/desktop_notification_profile_util.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 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_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ |
+#define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ |
+ |
+#include "chrome/common/content_settings.h" |
+ |
+class Profile; |
+ |
+// A series of common operations to interact with the profile's notification |
Peter Beverloo
2014/07/18 10:42:38
s/notification/Desktop Notification/ for now?
Miguel Garcia
2014/07/18 12:27:09
Done.
|
+// settings. |
+class DesktopNotificationProfileUtil { |
+ public: |
+ // NOTE: This should only be called on the UI thread. |
+ static void ResetToDefaultContentSetting(Profile* profile); |
+ |
+ // Clears the notifications setting for the given pattern. |
+ static void ClearSetting( |
+ Profile* profile, const ContentSettingsPattern& pattern); |
+ |
+ // Clears the sets of explicitly allowed and denied origins. |
+ static void ResetAllOrigins(Profile* profile); |
+ |
+ // Methods to setup and modify permission preferences. |
+ static void GrantPermission(Profile* profile, const GURL& origin); |
+ static void DenyPermission(Profile* profile, const GURL& origin); |
+ static void GetNotificationsSettings( |
+ Profile* profile, ContentSettingsForOneType* settings); |
+ static ContentSetting GetContentSetting(Profile* profile, const GURL& origin); |
+ static void SetDefaultContentSetting( |
+ Profile* profile, ContentSetting setting); |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil); |
+}; |
+ |
+#endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ |