Chromium Code Reviews| Index: android_webview/native/aw_settings.cc |
| diff --git a/android_webview/native/aw_settings.cc b/android_webview/native/aw_settings.cc |
| index 77892fd59a0e8101b5edeb55f59101a100af638f..88eab9eb0802505e497b3d41e4101e4cbe4c65a0 100644 |
| --- a/android_webview/native/aw_settings.cc |
| +++ b/android_webview/native/aw_settings.cc |
| @@ -429,10 +429,21 @@ void AwSettings::PopulateWebPreferencesLocked(JNIEnv* env, |
| web_prefs->experimental_webgl_enabled && |
| enable_supported_hardware_accelerated_features; |
| - web_prefs->allow_displaying_insecure_content = |
| - Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); |
| - web_prefs->allow_running_insecure_content = |
| - Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
| + // If mixed content running is allowed than displaying must be allowed too. |
| + DCHECK(!Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj) || |
| + Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj)); |
|
Torne
2016/08/31 12:49:59
These two DCHECKs are identical? Also, it'd be cle
carlosk
2016/09/02 23:47:42
Indeed. But as you also realized, DCHECK_IMPLIES i
|
| + // If mixed content displaying is not allowed than running must not be allowed |
| + // either. |
| + DCHECK(Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj) || |
| + !Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj)); |
| + if (Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj)) { |
|
Torne
2016/08/31 12:49:59
The actual Java side value stored is an enum: WebS
carlosk
2016/09/02 23:47:42
Agreed. I didn't realize those getters were used o
|
| + web_prefs->strict_mixed_content_checking = false; |
| + web_prefs->allow_running_insecure_content = |
| + Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); |
| + } else { |
| + web_prefs->strict_mixed_content_checking = true; |
| + web_prefs->allow_running_insecure_content = false; |
| + } |
| web_prefs->fullscreen_supported = |
| Java_AwSettings_getFullscreenSupportedLocked(env, obj); |