Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" | |
|
jochen (gone - plz use gerrit)
2014/09/02 08:15:50
why do you include base/macros.h everywhere? this
vasilii
2014/09/02 08:50:37
I removed some includes from content_settings_patt
| |
| 8 #include "chrome/common/content_settings.h" | 9 #include "chrome/common/content_settings.h" |
| 9 | 10 |
| 10 class Profile; | 11 class Profile; |
| 11 | 12 |
| 12 // 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 |
| 13 // Notification settings. | 14 // Notification settings. |
| 14 class DesktopNotificationProfileUtil { | 15 class DesktopNotificationProfileUtil { |
| 15 public: | 16 public: |
| 16 // NOTE: This should only be called on the UI thread. | 17 // NOTE: This should only be called on the UI thread. |
| 17 static void ResetToDefaultContentSetting(Profile* profile); | 18 static void ResetToDefaultContentSetting(Profile* profile); |
| 18 | 19 |
| 19 // Clears the notifications setting for the given pattern. | 20 // Clears the notifications setting for the given pattern. |
| 20 static void ClearSetting( | 21 static void ClearSetting( |
| 21 Profile* profile, const ContentSettingsPattern& pattern); | 22 Profile* profile, const ContentSettingsPattern& pattern); |
| 22 | 23 |
| 23 // Methods to setup and modify permission preferences. | 24 // Methods to setup and modify permission preferences. |
| 24 static void GrantPermission(Profile* profile, const GURL& origin); | 25 static void GrantPermission(Profile* profile, const GURL& origin); |
| 25 static void DenyPermission(Profile* profile, const GURL& origin); | 26 static void DenyPermission(Profile* profile, const GURL& origin); |
| 26 static void GetNotificationsSettings( | 27 static void GetNotificationsSettings( |
| 27 Profile* profile, ContentSettingsForOneType* settings); | 28 Profile* profile, ContentSettingsForOneType* settings); |
| 28 static ContentSetting GetContentSetting(Profile* profile, const GURL& origin); | 29 static ContentSetting GetContentSetting(Profile* profile, const GURL& origin); |
| 29 static void UsePermission(Profile* profile, const GURL& origin); | 30 static void UsePermission(Profile* profile, const GURL& origin); |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil); | 33 DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopNotificationProfileUtil); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ | 36 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_PROFILE_UTIL_H_ |
| OLD | NEW |