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

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 965103004: Stop using the MEDIASTREAM content setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated policy Created 5 years, 10 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/media/media_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index ef6127b337e5a3a6aaec44dac7a5c4bee431a59b..c09a5b89cdbd7d2cc581cc9582303fb12acea5ab 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -397,7 +397,13 @@ bool MediaCaptureDevicesDispatcher::CheckMediaAccessPermission(
}
#endif
- if (CheckAllowAllMediaStreamContentForOrigin(profile, security_origin))
+ ContentSettingsType contentSettingsType =
+ type == content::MEDIA_DEVICE_AUDIO_CAPTURE
+ ? CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
+ : CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA;
+
+ if (CheckAllowAllMediaStreamContentForOrigin(
+ profile, security_origin, contentSettingsType))
return true;
const char* policy_name = type == content::MEDIA_DEVICE_AUDIO_CAPTURE
@@ -417,9 +423,7 @@ bool MediaCaptureDevicesDispatcher::CheckMediaAccessPermission(
if (profile->GetHostContentSettingsMap()->GetContentSetting(
security_origin,
security_origin,
- type == content::MEDIA_DEVICE_AUDIO_CAPTURE
- ? CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
- : CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
+ contentSettingsType,
NO_RESOURCE_IDENTIFIER) == CONTENT_SETTING_ALLOW) {
return true;
}
@@ -438,7 +442,13 @@ bool MediaCaptureDevicesDispatcher::CheckMediaAccessPermission(
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- if (CheckAllowAllMediaStreamContentForOrigin(profile, security_origin))
+ ContentSettingsType contentSettingsType =
+ type == content::MEDIA_DEVICE_AUDIO_CAPTURE
+ ? CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
+ : CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA;
+
+ if (CheckAllowAllMediaStreamContentForOrigin(
+ profile, security_origin, contentSettingsType))
return true;
const char* policy_name = type == content::MEDIA_DEVICE_AUDIO_CAPTURE
@@ -458,9 +468,7 @@ bool MediaCaptureDevicesDispatcher::CheckMediaAccessPermission(
if (profile->GetHostContentSettingsMap()->GetContentSetting(
security_origin,
security_origin,
- type == content::MEDIA_DEVICE_AUDIO_CAPTURE
- ? CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
- : CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
+ contentSettingsType,
NO_RESOURCE_IDENTIFIER) == CONTENT_SETTING_ALLOW) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698