summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkwst <mkwst@chromium.org>2016-01-22 06:49:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 14:50:48 +0000
commit98bda6fbd2ce71a9721f66426d95f3d1340319ce (patch)
treeec6bb134ae6faa0455c3b63762409afdf9b4d4e2
parent2679052c78ff06908573c47b9f7021c9350407e0 (diff)
downloadchromium_src-98bda6fbd2ce71a9721f66426d95f3d1340319ce.zip
chromium_src-98bda6fbd2ce71a9721f66426d95f3d1340319ce.tar.gz
chromium_src-98bda6fbd2ce71a9721f66426d95f3d1340319ce.tar.bz2
Remove 'WebPlugin::CheckIfRunInsecureContent'.
We don't need this anymore, as non-NPAPI plugins run through the normal loading infrastructure, and are correctly checked for mixed content violations. BUG=493212 Review URL: https://codereview.chromium.org/1621503003 Cr-Commit-Position: refs/heads/master@{#370963}
-rw-r--r--content/child/npapi/webplugin.h4
-rw-r--r--content/child/plugin_messages.h4
-rw-r--r--content/plugin/webplugin_proxy.cc7
-rw-r--r--content/plugin/webplugin_proxy.h1
-rw-r--r--content/renderer/npapi/webplugin_delegate_proxy.cc7
-rw-r--r--content/renderer/npapi/webplugin_delegate_proxy.h1
-rw-r--r--content/renderer/npapi/webplugin_impl.cc18
-rw-r--r--content/renderer/npapi/webplugin_impl.h1
-rw-r--r--third_party/WebKit/Source/web/WebLocalFrameImpl.cpp11
-rw-r--r--third_party/WebKit/Source/web/WebLocalFrameImpl.h1
-rw-r--r--third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp6
-rw-r--r--third_party/WebKit/Source/web/WebRemoteFrameImpl.h1
-rw-r--r--third_party/WebKit/public/web/WebFrame.h4
13 files changed, 0 insertions, 66 deletions
diff --git a/content/child/npapi/webplugin.h b/content/child/npapi/webplugin.h
index 9eb0be9..99fea75 100644
--- a/content/child/npapi/webplugin.h
+++ b/content/child/npapi/webplugin.h
@@ -94,10 +94,6 @@ class WebPlugin {
// HTTP URL redirect notifications.
virtual void URLRedirectResponse(bool allow, int resource_id) = 0;
- // Returns true if the new url is a secure transition. This is to catch a
- // plugin src url transitioning from https to http.
- virtual bool CheckIfRunInsecureContent(const GURL& url) = 0;
-
#if defined(OS_WIN)
// |pump_messages_event| is a event handle which is used in NPP_HandleEvent
// calls to pump messages if the plugin enters a modal loop.
diff --git a/content/child/plugin_messages.h b/content/child/plugin_messages.h
index 8cf591b..71cd6d3 100644
--- a/content/child/plugin_messages.h
+++ b/content/child/plugin_messages.h
@@ -238,10 +238,6 @@ IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse,
bool /* allow */,
int /* resource_id */)
-IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_CheckIfRunInsecureContent,
- GURL /* url */,
- bool /* result */)
-
#if defined(OS_WIN)
// The modal_loop_pump_messages_event parameter is an event handle which is
// passed in for windowless plugins and is used to indicate if messages
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 3d32254..f9ce4a3 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -543,13 +543,6 @@ void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) {
Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id));
}
-bool WebPluginProxy::CheckIfRunInsecureContent(const GURL& url) {
- bool result = true;
- Send(new PluginHostMsg_CheckIfRunInsecureContent(
- route_id_, url, &result));
- return result;
-}
-
#if defined(OS_WIN) && !defined(USE_AURA)
void WebPluginProxy::UpdateIMEStatus() {
// Retrieve the IME status from a plugin and send it to a renderer process
diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h
index 696dc0e..3d3e656 100644
--- a/content/plugin/webplugin_proxy.h
+++ b/content/plugin/webplugin_proxy.h
@@ -81,7 +81,6 @@ class WebPluginProxy : public WebPlugin,
bool IsOffTheRecord() override;
void ResourceClientDeleted(WebPluginResourceClient* resource_client) override;
void URLRedirectResponse(bool allow, int resource_id) override;
- bool CheckIfRunInsecureContent(const GURL& url) override;
#if defined(OS_WIN)
void SetWindowlessData(HANDLE pump_messages_event,
gfx::NativeViewId dummy_activation_window) override;
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index 66f8821..a14a7a9 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -388,8 +388,6 @@ bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
OnDeferResourceLoading)
IPC_MESSAGE_HANDLER(PluginHostMsg_URLRedirectResponse,
OnURLRedirectResponse)
- IPC_MESSAGE_HANDLER(PluginHostMsg_CheckIfRunInsecureContent,
- OnCheckIfRunInsecureContent)
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessData, OnSetWindowlessData)
IPC_MESSAGE_HANDLER(PluginHostMsg_NotifyIMEStatus, OnNotifyIMEStatus)
@@ -1080,9 +1078,4 @@ void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
plugin_->URLRedirectResponse(allow, resource_id);
}
-void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url,
- bool* result) {
- *result = plugin_->CheckIfRunInsecureContent(url);
-}
-
} // namespace content
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.h b/content/renderer/npapi/webplugin_delegate_proxy.h
index 62fa840..cb64a36 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.h
+++ b/content/renderer/npapi/webplugin_delegate_proxy.h
@@ -151,7 +151,6 @@ class WebPluginDelegateProxy
void OnDidStopLoading();
void OnDeferResourceLoading(unsigned long resource_id, bool defer);
void OnURLRedirectResponse(bool allow, int resource_id);
- void OnCheckIfRunInsecureContent(const GURL& url, bool* result);
#if defined(OS_MACOSX)
void OnFocusChanged(bool focused);
void OnStartIme();
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc
index f5b0273..7a6b059 100644
--- a/content/renderer/npapi/webplugin_impl.cc
+++ b/content/renderer/npapi/webplugin_impl.cc
@@ -763,13 +763,6 @@ void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) {
}
}
-bool WebPluginImpl::CheckIfRunInsecureContent(const GURL& url) {
- if (!webframe_)
- return true;
-
- return webframe_->checkIfRunInsecureContent(url);
-}
-
#if defined(OS_MACOSX)
WebPluginAcceleratedSurface* WebPluginImpl::GetAcceleratedSurface(
gfx::GpuPreference gpu_preference) {
@@ -858,17 +851,6 @@ void WebPluginImpl::willFollowRedirect(WebURLLoader* loader,
// until kDirectNPAPIRequests is the default and we can remove this old path.
WebPluginImpl::ClientInfo* client_info = GetClientInfoFromLoader(loader);
if (client_info) {
- // Currently this check is just to catch an https -> http redirect when
- // loading the main plugin src URL. Longer term, we could investigate
- // firing mixed diplay or scripting issues for subresource loads
- // initiated by plugins.
- if (client_info->is_plugin_src_load &&
- webframe_ &&
- !webframe_->checkIfRunInsecureContent(new_request.url())) {
- loader->cancel();
- client_info->client->DidFail(client_info->id);
- return;
- }
if (net::HttpResponseHeaders::IsRedirectResponseCode(
response.httpStatusCode())) {
// If the plugin does not participate in url redirect notifications then
diff --git a/content/renderer/npapi/webplugin_impl.h b/content/renderer/npapi/webplugin_impl.h
index a7408cb..2d94b1f 100644
--- a/content/renderer/npapi/webplugin_impl.h
+++ b/content/renderer/npapi/webplugin_impl.h
@@ -117,7 +117,6 @@ class WebPluginImpl : public WebPlugin,
bool IsOffTheRecord() override;
void SetDeferResourceLoading(unsigned long resource_id, bool defer) override;
void URLRedirectResponse(bool allow, int resource_id) override;
- bool CheckIfRunInsecureContent(const GURL& url) override;
#if defined(OS_WIN)
void SetWindowlessData(HANDLE pump_messages_event,
gfx::NativeViewId dummy_activation_window) override {}
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index c8ea114..cc03905 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -872,17 +872,6 @@ void WebLocalFrameImpl::collectGarbage()
V8GCController::collectGarbage(v8::Isolate::GetCurrent());
}
-bool WebLocalFrameImpl::checkIfRunInsecureContent(const WebURL& url) const
-{
- ASSERT(frame());
-
- // This is only called (eventually, through proxies and delegates and IPC) from
- // PluginURLFetcher::OnReceivedRedirect for redirects of NPAPI resources.
- //
- // FIXME: Remove this method entirely once we smother NPAPI.
- return !MixedContentChecker::shouldBlockFetch(frame(), WebURLRequest::RequestContextObject, WebURLRequest::FrameTypeNested, url);
-}
-
v8::Local<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue(const WebScriptSource& source)
{
ASSERT(frame());
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.h b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
index d0bb44b..9687c43 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
@@ -113,7 +113,6 @@ public:
void setIsolatedWorldHumanReadableName(int worldID, const WebString&) override;
void addMessageToConsole(const WebConsoleMessage&) override;
void collectGarbage() override;
- bool checkIfRunInsecureContent(const WebURL&) const override;
v8::Local<v8::Value> executeScriptAndReturnValue(
const WebScriptSource&) override;
void requestExecuteScriptAndReturnValue(
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index a383c3f..f4b0b21 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -250,12 +250,6 @@ void WebRemoteFrameImpl::collectGarbage()
ASSERT_NOT_REACHED();
}
-bool WebRemoteFrameImpl::checkIfRunInsecureContent(const WebURL&) const
-{
- ASSERT_NOT_REACHED();
- return false;
-}
-
v8::Local<v8::Value> WebRemoteFrameImpl::executeScriptAndReturnValue(
const WebScriptSource&)
{
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
index 0088077..2d7f4db1 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
@@ -63,7 +63,6 @@ public:
void setIsolatedWorldContentSecurityPolicy(int worldID, const WebString&) override;
void addMessageToConsole(const WebConsoleMessage&) override;
void collectGarbage() override;
- bool checkIfRunInsecureContent(const WebURL&) const override;
v8::Local<v8::Value> executeScriptAndReturnValue(
const WebScriptSource&) override;
void executeScriptInIsolatedWorld(
diff --git a/third_party/WebKit/public/web/WebFrame.h b/third_party/WebKit/public/web/WebFrame.h
index 9ae9234..b0ccc8e 100644
--- a/third_party/WebKit/public/web/WebFrame.h
+++ b/third_party/WebKit/public/web/WebFrame.h
@@ -316,10 +316,6 @@ public:
// Calls window.gc() if it is defined.
virtual void collectGarbage() = 0;
- // Check if the scripting URL represents a mixed content condition relative
- // to this frame.
- virtual bool checkIfRunInsecureContent(const WebURL&) const = 0;
-
// Executes script in the context of the current page and returns the value
// that the script evaluated to.
// DEPRECATED: Use WebLocalFrame::requestExecuteScriptAndReturnValue.