Allow more insecure content when web-security is off

Close #2076
This commit is contained in:
Cheng Zhao 2015-07-10 13:29:46 +08:00
parent 7a390bdd4c
commit 5ae57baf11

View file

@ -419,8 +419,6 @@ void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
std::vector<base::FilePath> list;
if (web_preferences_.Get("javascript", &b))
prefs->javascript_enabled = b;
if (web_preferences_.Get("web-security", &b))
prefs->web_security_enabled = b;
if (web_preferences_.Get("images", &b))
prefs->images_enabled = b;
if (web_preferences_.Get("java", &b))
@ -431,6 +429,11 @@ void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
prefs->experimental_webgl_enabled = b;
if (web_preferences_.Get("webaudio", &b))
prefs->webaudio_enabled = b;
if (web_preferences_.Get("web-security", &b)) {
prefs->web_security_enabled = b;
prefs->allow_displaying_insecure_content = !b;
prefs->allow_running_insecure_content = !b;
}
if (web_preferences_.Get("extra-plugin-dirs", &list)) {
if (content::PluginService::GetInstance()->NPAPIPluginsSupported()) {
for (size_t i = 0; i < list.size(); ++i)