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

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

Issue 1686343002: Change HostContentSettingsMap::SetContentSetting to use GURLs instead of patterns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add migrate method Created 4 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_stream_devices_controller.cc
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index e215cd5e46684655ac5c917464da24544022d13e..109dc54252f0d63d3b0f45057217f7a117652e4c 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -458,8 +458,6 @@ void MediaStreamDevicesController::StorePermission(
ContentSetting new_audio_setting,
ContentSetting new_video_setting) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- ContentSettingsPattern primary_pattern =
- ContentSettingsPattern::FromURLNoWildcard(request_.security_origin);
bool is_pepper_request =
request_.request_type == content::MEDIA_OPEN_DEVICE_PEPPER_ONLY;
@@ -467,19 +465,20 @@ void MediaStreamDevicesController::StorePermission(
if (IsAskingForAudio() && new_audio_setting != CONTENT_SETTING_ASK) {
if (ShouldPersistContentSetting(new_audio_setting, request_.security_origin,
is_pepper_request)) {
- HostContentSettingsMapFactory::GetForProfile(profile_)->SetContentSetting(
- primary_pattern, ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, std::string(),
- new_audio_setting);
+ HostContentSettingsMapFactory::GetForProfile(profile_)
+ ->SetContentSettingDefaultScope(request_.security_origin, GURL(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
+ std::string(), new_audio_setting);
}
}
if (IsAskingForVideo() && new_video_setting != CONTENT_SETTING_ASK) {
if (ShouldPersistContentSetting(new_video_setting, request_.security_origin,
is_pepper_request)) {
- HostContentSettingsMapFactory::GetForProfile(profile_)->SetContentSetting(
- primary_pattern, ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, std::string(),
- new_video_setting);
+ HostContentSettingsMapFactory::GetForProfile(profile_)
+ ->SetContentSettingDefaultScope(
+ request_.security_origin, GURL(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, std::string(),
+ new_video_setting);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698