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

Unified Diff: content/child/web_url_request_util.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: Addressed all jam@ latest comments. Created 3 years, 11 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
Index: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index 606583175cb18c7d8f4ea871c2c7da10d1840a42..b68b1c7d052086ded0a5a06a91ad3efb49b139fb 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -18,6 +18,8 @@
#include "third_party/WebKit/public/platform/WebCachePolicy.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
+#include "third_party/WebKit/public/platform/WebMixedContent.h"
+#include "third_party/WebKit/public/platform/WebMixedContentContextType.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -471,6 +473,19 @@ RequestContextType GetRequestContextTypeForWebURLRequest(
return static_cast<RequestContextType>(request.getRequestContext());
}
+blink::WebMixedContentContextType GetMixedContentContextTypeForWebURLRequest(
+ const blink::WebURLRequest& request) {
+ bool block_mixed_plugin_content = false;
+ if (request.getExtraData()) {
+ RequestExtraData* extra_data =
+ static_cast<RequestExtraData*>(request.getExtraData());
+ block_mixed_plugin_content = extra_data->block_mixed_plugin_content();
+ }
+
+ return blink::WebMixedContent::contextTypeFromRequestContext(
+ request.getRequestContext(), block_mixed_plugin_content);
+}
+
STATIC_ASSERT_ENUM(SkipServiceWorker::NONE,
WebURLRequest::SkipServiceWorker::None);
STATIC_ASSERT_ENUM(SkipServiceWorker::CONTROLLING,

Powered by Google App Engine
This is Rietveld 408576698