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

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

Issue 398373006: Audit the last time the media stream content settings have been used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3cb55cc23313826bef8491fc84a3064ca910a278..e163565ad81043df6aa20edc08b8cdbd4ccd174f 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -345,6 +345,19 @@ void MediaStreamDevicesController::Accept(bool update_content_setting) {
SetPermission(true);
}
}
+
+ if (audio_allowed) {
+ profile_->GetHostContentSettingsMap()->UpdateLastUsageByPattern(
+ ContentSettingsPattern::FromURLNoWildcard(request_.security_origin),
tommi (sloooow) - chröme 2014/07/18 07:30:24 4 space indent here and below.
Daniel Nishi 2014/07/18 15:59:26 Done.
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC);
+ }
+ if (video_allowed) {
+ profile_->GetHostContentSettingsMap()->UpdateLastUsageByPattern(
+ ContentSettingsPattern::FromURLNoWildcard(request_.security_origin),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
+ }
}
scoped_ptr<content::MediaStreamUI> ui;
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698