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

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

Issue 304183006: Only store per-navigation permissions for http requests and not https. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | 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 395a500cd1e4f0968052af60fac82d5cbe18ab71..45e002d40614917bdb03f44bf60e2e98b71da5fc 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -410,13 +410,16 @@ void MediaStreamDevicesController::Accept(bool update_content_setting) {
&devices);
}
- // Tag this navigation entry with the granted permissions.
- // This avoids repeated prompts for requests accessed via http.
- content::NavigationEntry* navigation_entry =
- web_contents_->GetController().GetVisibleEntry();
- if (navigation_entry) {
- SetMediaPermissionsForNavigationEntry(
- navigation_entry, request_, audio_allowed, video_allowed);
+ // For pages accessed via http (not https), tag this navigation entry
+ // with the granted permissions. This avoids repeated prompts for
+ // device access.
+ if (!IsSchemeSecure()) {
+ content::NavigationEntry* navigation_entry =
+ web_contents_->GetController().GetVisibleEntry();
+ if (navigation_entry) {
+ SetMediaPermissionsForNavigationEntry(
+ navigation_entry, request_, audio_allowed, video_allowed);
+ }
}
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698