diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 19:13:03 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 19:13:03 +0000 |
commit | 01cb1991150f05ffb77a43e98005661671a0aff0 (patch) | |
tree | c61b5e8446110c284eed4812ce511d5117853a9e /content/plugin/webplugin_proxy.cc | |
parent | 35179be6fcd7cf9cb4db346e266621aab6941c14 (diff) | |
download | chromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.zip chromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.tar.gz chromium_src-01cb1991150f05ffb77a43e98005661671a0aff0.tar.bz2 |
Load NPAPI plugin resources through the browser process directly instead of going through the renderer. This is needed because when we have site isolation enabled we won't trust the renderer to fetch urls from arbitrary origins, which is something that NPAPI plugins can do.
In a followup I'll implement range requests.
For now this is behind the --direct-npapi-requests flag.
BUG=286074
R=ananta@chromium.org, jschuh@chromium.org
Review URL: https://codereview.chromium.org/23503043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/webplugin_proxy.cc')
-rw-r--r-- | content/plugin/webplugin_proxy.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc index 0988d68..51635ec 100644 --- a/content/plugin/webplugin_proxy.cc +++ b/content/plugin/webplugin_proxy.cc @@ -14,6 +14,7 @@ #include "content/child/npapi/npobject_proxy.h" #include "content/child/npapi/npobject_util.h" #include "content/child/npapi/webplugin_delegate_impl.h" +#include "content/child/npapi/webplugin_resource_client.h" #include "content/child/plugin_messages.h" #include "content/plugin/plugin_channel.h" #include "content/plugin/plugin_thread.h" @@ -676,12 +677,14 @@ bool WebPluginProxy::IsOffTheRecord() { void WebPluginProxy::ResourceClientDeleted( WebPluginResourceClient* resource_client) { + // resource_client->ResourceId() is 0 at this point, so can't use it as an + // index into the map. ResourceClientMap::iterator index = resource_clients_.begin(); while (index != resource_clients_.end()) { WebPluginResourceClient* client = (*index).second; - if (client == resource_client) { - resource_clients_.erase(index++); + resource_clients_.erase(index); + return; } else { index++; } @@ -692,6 +695,13 @@ 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( + host_render_view_routing_id_, url, &result)); + return result; +} + #if defined(OS_WIN) && !defined(USE_AURA) void WebPluginProxy::UpdateIMEStatus() { // Retrieve the IME status from a plug-in and send it to a renderer process |