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

Side by Side Diff: chrome/browser/notifications/desktop_notification_profile_util.h

Issue 376253005: Migrate the notification permission to the new common permission classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 Desktop
13 // Notification 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 // Methods to setup and modify permission preferences.
24 static void GrantPermission(Profile* profile, const GURL& origin);
25 static void DenyPermission(Profile* profile, const GURL& origin);
26 static void GetNotificationsSettings(
27 Profile* profile, ContentSettingsForOneType* settings);
28 static ContentSetting GetContentSetting(Profile* profile, const GURL& origin);
29
30 private:
31 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil);
32 };
33
34 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698