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

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

Issue 2909453002: Support persist toggle in PermissionRequestManager path on Android (Closed)
Patch Set: Created 3 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 | chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/media_stream_devices_controller.cc
diff --git a/chrome/browser/media/webrtc/media_stream_devices_controller.cc b/chrome/browser/media/webrtc/media_stream_devices_controller.cc
index 2ee1bf2bafb9861b76a3de6018ff83ad81b0987b..69e37ddcedc6225ad4ba2dc9674d0af137eb7306 100644
--- a/chrome/browser/media/webrtc/media_stream_devices_controller.cc
+++ b/chrome/browser/media/webrtc/media_stream_devices_controller.cc
@@ -291,7 +291,11 @@ MediaStreamDevicesController::Request::GetPermissionRequestType() const {
bool MediaStreamDevicesController::Request::ShouldShowPersistenceToggle()
const {
- return PermissionUtil::ShouldShowPersistenceToggle();
+ if (IsAskingForVideo())
+ return PermissionUtil::ShouldShowPersistenceToggle(
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
raymes 2017/05/30 03:58:58 nit: {} for multi-line if
+ return PermissionUtil::ShouldShowPersistenceToggle(
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC);
raymes 2017/05/30 03:58:58 If we're asking for both mic and camera, should we
Timothy Loh 2017/05/30 05:52:43 I changed this to just check CAMERA and added a co
}
// Implementation of PermissionPromptDelegate which actually shows a permission
« no previous file with comments | « no previous file | chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698