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

Unified Diff: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: added class-level comment Created 3 years, 8 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: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
index c6a9cfbced4bfe55958a79c0b58845cd0c6ed79f..bb242516a9ff57f48cfc998b15da41b31475c93b 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -29,6 +29,7 @@
#include "core/loader/MixedContentChecker.h"
#include "core/dom/Document.h"
+#include "core/frame/ContentSettingsClient.h"
#include "core/frame/Frame.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/LocalFrameClient.h"
@@ -323,6 +324,7 @@ bool MixedContentChecker::shouldBlockFetch(
// Use the current local frame's client; the embedder doesn't distinguish
// mixed content signals from different frames on the same page.
LocalFrameClient* client = frame->loader().client();
+ ContentSettingsClient* contentSettingsClient = frame->contentSettingsClient();
SecurityOrigin* securityOrigin =
mixedFrame->securityContext()->getSecurityOrigin();
bool allowed = false;
@@ -354,7 +356,7 @@ bool MixedContentChecker::shouldBlockFetch(
case WebMixedContentContextType::OptionallyBlockable:
allowed = !strictMode;
if (allowed) {
- client->passiveInsecureContentFound(url);
+ contentSettingsClient->passiveInsecureContentFound(url);
client->didDisplayInsecureContent();
}
break;
@@ -381,7 +383,7 @@ bool MixedContentChecker::shouldBlockFetch(
(!settings->getStrictlyBlockBlockableMixedContent() ||
settings->getAllowRunningOfInsecureContent());
allowed = shouldAskEmbedder &&
- client->allowRunningInsecureContent(
+ contentSettingsClient->allowRunningInsecureContent(
settings && settings->getAllowRunningOfInsecureContent(),
securityOrigin, url);
if (allowed) {
@@ -449,7 +451,8 @@ bool MixedContentChecker::shouldBlockWebSocket(
Settings* settings = mixedFrame->settings();
// Use the current local frame's client; the embedder doesn't distinguish
// mixed content signals from different frames on the same page.
- LocalFrameClient* client = frame->loader().client();
+ ContentSettingsClient* contentSettingsClient = frame->contentSettingsClient();
+ LocalFrameClient* client = frame->client();
SecurityOrigin* securityOrigin =
mixedFrame->securityContext()->getSecurityOrigin();
bool allowed = false;
@@ -463,8 +466,8 @@ bool MixedContentChecker::shouldBlockWebSocket(
if (!strictMode) {
bool allowedPerSettings =
settings && settings->getAllowRunningOfInsecureContent();
- allowed = client->allowRunningInsecureContent(allowedPerSettings,
- securityOrigin, url);
+ allowed = contentSettingsClient->allowRunningInsecureContent(
+ allowedPerSettings, securityOrigin, url);
}
if (allowed)
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698