Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4294)

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Minor changes from nasko@'s comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index defce72bc6c54d54b67bcbc87c692d6cd2b183b5..ce97047fda26b4cbdff20e096e5cf482d29d4eed 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -16,6 +16,8 @@
#include "chrome/browser/content_settings/chrome_content_settings_utils.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
+#include "chrome/browser/content_settings/mixed_content_settings_tab_helper.h"
+#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "chrome/browser/infobars/infobar_service.h"
@@ -1060,6 +1062,14 @@ void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() {
if (!web_contents())
return;
+ MixedContentSettingsTabHelper* mixed_content_settings =
+ MixedContentSettingsTabHelper::FromWebContents(web_contents());
+ if (mixed_content_settings) {
+ // Update browser side settings to allow active mixed content.
+ mixed_content_settings->AllowRunningOfInsecureContent();
+ }
+
+ // Update renderer side settings to allow active mixed content.
web_contents()->ForEachFrame(base::Bind(&::SetAllowRunningInsecureContent));
content_settings::RecordMixedScriptAction(
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698