Backport (2-0-x) - Correct the default of allowRunningInsecureContent as per docs (#12629)

* Correct the default of allowRunningInsecureContent as per docs

* fix linting

* Update calls to match native_mate API change
This commit is contained in:
trop[bot]
2018-04-18 05:53:32 -07:00
committed by Charles Kerr
parent 597c8964f6
commit f37bc4a9d4

View File

@@ -63,8 +63,15 @@ WebContentsPreferences::WebContentsPreferences(
SetDefaultBoolIfUndefined("images", true);
SetDefaultBoolIfUndefined("textAreasAreResizable", true);
SetDefaultBoolIfUndefined("webgl", true);
SetDefaultBoolIfUndefined("webSecurity", true);
SetDefaultBoolIfUndefined("allowRunningInsecureContent", false);
bool webSecurity = true;
SetDefaultBoolIfUndefined("webSecurity", webSecurity);
// If webSecurity was explicity set to false, let's inherit that into
// insecureContent
if (web_preferences.Get("webSecurity", &webSecurity) && !webSecurity) {
SetDefaultBoolIfUndefined("allowRunningInsecureContent", true);
} else {
SetDefaultBoolIfUndefined("allowRunningInsecureContent", false);
}
#if defined(OS_MACOSX)
SetDefaultBoolIfUndefined(options::kScrollBounce, false);
#endif