| 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 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 5 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
| 6 | 6 |
| 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "components/content_settings/core/browser/host_content_settings_map.h" | 9 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 10 #include "components/content_settings/core/common/content_settings_pattern.h" | 10 #include "components/content_settings/core/common/content_settings_pattern.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 content_settings::ResourceIdentifier(), CONTENT_SETTING_BLOCK); | 42 content_settings::ResourceIdentifier(), CONTENT_SETTING_BLOCK); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void DesktopNotificationProfileUtil::GetNotificationsSettings( | 45 void DesktopNotificationProfileUtil::GetNotificationsSettings( |
| 46 Profile* profile, ContentSettingsForOneType* settings) { | 46 Profile* profile, ContentSettingsForOneType* settings) { |
| 47 HostContentSettingsMapFactory::GetForProfile(profile) | 47 HostContentSettingsMapFactory::GetForProfile(profile) |
| 48 ->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | 48 ->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
| 49 content_settings::ResourceIdentifier(), | 49 content_settings::ResourceIdentifier(), |
| 50 settings); | 50 settings); |
| 51 } | 51 } |
| 52 | |
| 53 ContentSetting DesktopNotificationProfileUtil::GetContentSetting( | |
| 54 Profile* profile, const GURL& origin) { | |
| 55 return HostContentSettingsMapFactory::GetForProfile(profile) | |
| 56 ->GetContentSetting(origin, | |
| 57 origin, | |
| 58 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | |
| 59 content_settings::ResourceIdentifier()); | |
| 60 } | |
| OLD | NEW |