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

Unified Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 7810017: Revert 98938 - Migrate Obsolete NotificationsSettings and remove content_settings::NotificationsP... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/host_content_settings_map.cc
===================================================================
--- chrome/browser/content_settings/host_content_settings_map.cc (revision 98940)
+++ chrome/browser/content_settings/host_content_settings_map.cc (working copy)
@@ -38,10 +38,7 @@
// Returns true if we should allow all content types for this URL. This is
// true for various internal objects like chrome:// URLs, so UI and other
// things users think of as "not webpages" don't break.
-static bool ShouldAllowAllContent(const GURL& url,
- ContentSettingsType content_type) {
- if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
- return false;
+static bool ShouldAllowAllContent(const GURL& url) {
return url.SchemeIs(chrome::kChromeDevToolsScheme) ||
url.SchemeIs(chrome::kChromeInternalScheme) ||
url.SchemeIs(chrome::kChromeUIScheme) ||
@@ -187,7 +184,7 @@
const GURL& url,
const GURL& first_party_url,
bool setting_cookie) const {
- if (ShouldAllowAllContent(first_party_url, CONTENT_SETTINGS_TYPE_COOKIES))
+ if (ShouldAllowAllContent(first_party_url))
return CONTENT_SETTING_ALLOW;
// First get any host-specific settings.
@@ -248,7 +245,7 @@
const GURL& secondary_url,
ContentSettingsType content_type,
const std::string& resource_identifier) const {
- if (ShouldAllowAllContent(secondary_url, content_type))
+ if (ShouldAllowAllContent(secondary_url))
return CONTENT_SETTING_ALLOW;
// Iterate through the list of providers and break when the first non default
@@ -287,6 +284,9 @@
ContentSettings HostContentSettingsMap::GetNonDefaultContentSettings(
const GURL& primary_url,
const GURL& secondary_url) const {
+ if (ShouldAllowAllContent(secondary_url))
+ return ContentSettings(CONTENT_SETTING_ALLOW);
+
ContentSettings output(CONTENT_SETTING_DEFAULT);
for (int j = 0; j < CONTENT_SETTINGS_NUM_TYPES; ++j) {
output.settings[j] = GetNonDefaultContentSetting(

Powered by Google App Engine
This is Rietveld 408576698