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; |
} |