Index: chrome/browser/content_settings/tab_specific_content_settings.cc |
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc |
index 70c1b17591f3f4b426d1f8fd3fe9ed7440c4a998..1d6cf1a146f08f7c10bb0f1e833c846a05a37eb9 100644 |
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
@@ -238,6 +238,8 @@ bool TabSpecificContentSettings::IsContentBlocked( |
DCHECK_NE(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, content_type) |
<< "Notifications settings handled by " |
<< "ContentSettingsNotificationsImageModel"; |
+ DCHECK_NE(CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, content_type) |
+ << "Automatic downloads handled by DownloadRequestLimiter"; |
if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || |
content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || |
@@ -248,7 +250,6 @@ bool TabSpecificContentSettings::IsContentBlocked( |
content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || |
content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || |
content_type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER || |
- content_type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || |
content_type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX) { |
const auto& it = content_settings_status_.find(content_type); |
if (it != content_settings_status_.end()) |
@@ -285,13 +286,15 @@ void TabSpecificContentSettings::SetSubresourceBlockageIndicated() { |
bool TabSpecificContentSettings::IsContentAllowed( |
ContentSettingsType content_type) const { |
+ DCHECK_NE(CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, content_type) |
+ << "Automatic downloads handled by DownloadRequestLimiter"; |
+ |
// This method currently only returns meaningful values for the content type |
// cookies, media, PPAPI broker, downloads, and MIDI sysex. |
if (content_type != CONTENT_SETTINGS_TYPE_COOKIES && |
content_type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC && |
content_type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA && |
content_type != CONTENT_SETTINGS_TYPE_PPAPI_BROKER && |
- content_type != CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS && |
content_type != CONTENT_SETTINGS_TYPE_MIDI_SYSEX) { |
return false; |
} |
@@ -696,18 +699,6 @@ void TabSpecificContentSettings::FlashDownloadBlocked() { |
base::UTF8ToUTF16(content::kFlashPluginName)); |
} |
-void TabSpecificContentSettings::SetDownloadsBlocked(bool blocked) { |
- ContentSettingsStatus& status = |
- content_settings_status_[CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS]; |
- status.blocked = blocked; |
- status.allowed = !blocked; |
- status.blockage_indicated_to_user = false; |
- content::NotificationService::current()->Notify( |
- chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, |
- content::Source<WebContents>(web_contents()), |
- content::NotificationService::NoDetails()); |
-} |
- |
void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) { |
ContentSettingsStatus& status = |
content_settings_status_[CONTENT_SETTINGS_TYPE_POPUPS]; |