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

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

Issue 2020063003: Use GetPermissionStatus instead of DesktopNotificationProfileUtil::GetContentSetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove embber param for notifications Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/content_settings/core/common/content_settings.h" 9 #include "components/content_settings/core/common/content_settings.h"
10 10
11 class Profile; 11 class Profile;
12 12
13 // A series of common operations to interact with the profile's Desktop 13 // A series of common operations to interact with the profile's Desktop
14 // Notification settings. 14 // Notification settings.
15 class DesktopNotificationProfileUtil { 15 class DesktopNotificationProfileUtil {
16 public: 16 public:
17 // NOTE: This should only be called on the UI thread. 17 // NOTE: This should only be called on the UI thread.
18 static void ResetToDefaultContentSetting(Profile* profile); 18 static void ResetToDefaultContentSetting(Profile* profile);
19 19
20 // Clears the notifications setting for the given url. 20 // Clears the notifications setting for the given url.
21 static void ClearSetting(Profile* profile, const GURL& origin); 21 static void ClearSetting(Profile* profile, const GURL& origin);
22 22
23 // Methods to setup and modify permission preferences. 23 // Methods to setup and modify permission preferences.
24 static void GrantPermission(Profile* profile, const GURL& origin); 24 static void GrantPermission(Profile* profile, const GURL& origin);
25 static void DenyPermission(Profile* profile, const GURL& origin); 25 static void DenyPermission(Profile* profile, const GURL& origin);
26 static void GetNotificationsSettings( 26 static void GetNotificationsSettings(
27 Profile* profile, ContentSettingsForOneType* settings); 27 Profile* profile, ContentSettingsForOneType* settings);
28 static ContentSetting GetContentSetting(Profile* profile, const GURL& origin);
29 28
30 private: 29 private:
31 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil); 30 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil);
32 }; 31 };
33 32
34 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ 33 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698