OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ | |
6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ | |
7 | |
8 #include "chrome/common/content_settings.h" | |
9 | |
10 class Profile; | |
11 | |
12 // 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.
| |
13 // settings. | |
14 class DesktopNotificationProfileUtil { | |
15 public: | |
16 // NOTE: This should only be called on the UI thread. | |
17 static void ResetToDefaultContentSetting(Profile* profile); | |
18 | |
19 // Clears the notifications setting for the given pattern. | |
20 static void ClearSetting( | |
21 Profile* profile, const ContentSettingsPattern& pattern); | |
22 | |
23 // Clears the sets of explicitly allowed and denied origins. | |
24 static void ResetAllOrigins(Profile* profile); | |
25 | |
26 // Methods to setup and modify permission preferences. | |
27 static void GrantPermission(Profile* profile, const GURL& origin); | |
28 static void DenyPermission(Profile* profile, const GURL& origin); | |
29 static void GetNotificationsSettings( | |
30 Profile* profile, ContentSettingsForOneType* settings); | |
31 static ContentSetting GetContentSetting(Profile* profile, const GURL& origin); | |
32 static void SetDefaultContentSetting( | |
33 Profile* profile, ContentSetting setting); | |
34 | |
35 private: | |
36 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil); | |
37 }; | |
38 | |
39 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ | |
OLD | NEW |