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

Unified Diff: content/shell/browser/shell.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 | « content/shell/browser/shell.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell.cc
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index f25b9031a76ae83d48376a88c97361fd43013c85..1c4bb35352f7aef2c03b13ae762037e1ca770a40 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -37,6 +37,7 @@
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/browser/shell_devtools_frontend.h"
#include "content/shell/browser/shell_javascript_dialog_manager.h"
+#include "content/shell/common/layout_test/layout_test_switches.h"
#include "content/shell/common/shell_messages.h"
#include "content/shell/common/shell_switches.h"
#include "media/media_features.h"
@@ -480,6 +481,23 @@ void Shell::ActivateContents(WebContents* contents) {
contents->GetRenderViewHost()->GetWidget()->Focus();
}
+bool Shell::ShouldAllowRunningInsecureContent(
+ content::WebContents* web_contents,
+ bool allowed_per_prefs,
+ const url::Origin& origin,
+ const GURL& resource_url) {
+ bool allowed_by_test = false;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kRunLayoutTest)) {
+ const base::DictionaryValue& test_flags =
+ BlinkTestController::Get()
+ ->accumulated_layout_test_runtime_flags_changes();
+ test_flags.GetBoolean("running_insecure_content_allowed", &allowed_by_test);
+ }
+
+ return allowed_per_prefs || allowed_by_test;
+}
+
gfx::Size Shell::GetShellDefaultSize() {
static gfx::Size default_shell_size;
if (!default_shell_size.IsEmpty())
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698