Index: chrome/browser/android/preferences/pref_service_bridge.cc |
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc |
index cb5f1517f69bd78408e6bea0e484d87feb6ab8cb..f1734158a94c769092400c2d29880ad00db49b74 100644 |
--- a/chrome/browser/android/preferences/pref_service_bridge.cc |
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc |
@@ -445,7 +445,10 @@ static void SetCameraMicEnabled(JNIEnv* env, jobject obj, jboolean allow) { |
HostContentSettingsMap* host_content_settings_map = |
GetOriginalProfile()->GetHostContentSettingsMap(); |
host_content_settings_map->SetDefaultContentSetting( |
- CONTENT_SETTINGS_TYPE_MEDIASTREAM, |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, |
+ allow ? CONTENT_SETTING_ASK : CONTENT_SETTING_BLOCK); |
+ host_content_settings_map->SetDefaultContentSetting( |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, |
allow ? CONTENT_SETTING_ASK : CONTENT_SETTING_BLOCK); |
} |
@@ -551,15 +554,22 @@ static void SetAllowPopupsEnabled(JNIEnv* env, jobject obj, jboolean allow) { |
} |
static jboolean GetCameraMicEnabled(JNIEnv* env, jobject obj) { |
- return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM); |
+ return GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC) && |
+ GetBooleanForContentSetting(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
} |
static jboolean GetCameraMicUserModifiable(JNIEnv* env, jobject obj) { |
- return IsContentSettingUserModifiable(CONTENT_SETTINGS_TYPE_MEDIASTREAM); |
+ return IsContentSettingUserModifiable( |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC) && |
+ IsContentSettingUserModifiable( |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
} |
static jboolean GetCameraMicManagedByCustodian(JNIEnv* env, jobject obj) { |
- return IsContentSettingManagedByCustodian(CONTENT_SETTINGS_TYPE_MEDIASTREAM); |
+ return IsContentSettingManagedByCustodian( |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC) && |
+ IsContentSettingManagedByCustodian( |
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
} |
static jboolean GetAutologinEnabled(JNIEnv* env, jobject obj) { |