Correct the default of allowRunningInsecureContent as per docs (#12556)

* Correct the default of allowRunningInsecureContent as per docs

* fix linting

* Update calls to match native_mate API change
This commit is contained in:
Samuel Attard 2018-04-16 23:28:54 +10:00 committed by Charles Kerr
parent 7cc3b877dc
commit d06c79f5d3

View file

@ -64,8 +64,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