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

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

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 #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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698