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

Unified Diff: components/content_settings/core/browser/host_content_settings_map.cc

Issue 965103004: Stop using the MEDIASTREAM content setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over 1004733003. Created 5 years, 9 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: components/content_settings/core/browser/host_content_settings_map.cc
diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
index 0f22c831616ec74cad70a624dc6bd78e3e526bec..37eb6599f5b5fa2131e7dc723a44b08a0a3c4194 100644
--- a/components/content_settings/core/browser/host_content_settings_map.cc
+++ b/components/content_settings/core/browser/host_content_settings_map.cc
@@ -245,6 +245,10 @@ void HostContentSettingsMap::SetWebsiteSetting(
ContentSettingsType content_type,
const std::string& resource_identifier,
base::Value* value) {
+ // TODO(msramek): MEDIASTREAM is deprecated. Remove this check when all
+ // references to MEDIASTREAM are removed from the code.
+ DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_MEDIASTREAM);
+
DCHECK(IsValueAllowedForType(prefs_, value, content_type));
DCHECK(SupportsResourceIdentifier(content_type) ||
resource_identifier.empty());
@@ -496,9 +500,8 @@ bool HostContentSettingsMap::IsSettingAllowedForType(
return false;
}
- // We don't support ALLOW for media default setting.
- if (content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM &&
- setting == CONTENT_SETTING_ALLOW) {
+ // We don't support the mediastream setting.
+ if (content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM) {
return false;
}
@@ -713,6 +716,10 @@ scoped_ptr<base::Value> HostContentSettingsMap::GetWebsiteSettingInternal(
const std::string& resource_identifier,
content_settings::SettingInfo* info,
bool get_override) const {
+ // TODO(msramek): MEDIASTREAM is deprecated. Remove this check when all
+ // references to MEDIASTREAM are removed from the code.
+ DCHECK_NE(CONTENT_SETTINGS_TYPE_MEDIASTREAM, content_type);
+
UsedContentSettingsProviders();
ContentSettingsPattern* primary_pattern = NULL;
ContentSettingsPattern* secondary_pattern = NULL;

Powered by Google App Engine
This is Rietveld 408576698