diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 23:03:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 23:03:57 +0000 |
commit | 2dd868ff64f453c0da93c072986e1389836e8728 (patch) | |
tree | 89b767170d28968ffcdc7cf2b0770cfa2516da74 /content/plugin | |
parent | e8981b7eda49d88b74239c6c5dad5d0dd093a142 (diff) | |
download | chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.zip chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.tar.gz chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.tar.bz2 |
Stop using the default profile's proxy service for plugin proxy requests, and instead use the associated profile's proxy service. I proxy the IPC through the renderer first, as that makes it easy to get to the associated profile.
BUG=92361,64339
Review URL: http://codereview.chromium.org/7791005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin')
-rw-r--r-- | content/plugin/plugin_thread.cc | 18 | ||||
-rw-r--r-- | content/plugin/webplugin_proxy.cc | 6 | ||||
-rw-r--r-- | content/plugin/webplugin_proxy.h | 1 |
3 files changed, 7 insertions, 18 deletions
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc index c5d2953..9b27515 100644 --- a/content/plugin/plugin_thread.cc +++ b/content/plugin/plugin_thread.cc @@ -21,12 +21,10 @@ #include "base/threading/thread_local.h" #include "content/common/child_process.h" #include "content/common/content_switches.h" -#include "content/common/child_process_messages.h" #include "content/common/plugin_messages.h" #include "content/plugin/content_plugin_client.h" #include "content/plugin/npobject_util.h" #include "ipc/ipc_channel_handle.h" -#include "net/base/net_errors.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/plugin_lib.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" @@ -170,19 +168,3 @@ void PluginThread::OnCreateChannel(int renderer_id, void PluginThread::OnNotifyRenderersOfPendingShutdown() { PluginChannel::NotifyRenderersOfPendingShutdown(); } - -namespace webkit_glue { -bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { - int net_error; - std::string proxy_result; - - bool result = ChildThread::current()->Send( - new ChildProcessHostMsg_ResolveProxy(url, &net_error, &proxy_result)); - if (!result || net_error != net::OK) - return false; - - *proxy_list = proxy_result; - return true; -} - -} // namespace webkit_glue diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc index 809f12a..df76e8e 100644 --- a/content/plugin/webplugin_proxy.cc +++ b/content/plugin/webplugin_proxy.cc @@ -238,6 +238,12 @@ NPObject* WebPluginProxy::GetPluginElement() { return plugin_element_; } +bool WebPluginProxy::FindProxyForUrl(const GURL& url, std::string* proxy_list) { + bool result = false; + Send(new PluginHostMsg_ResolveProxy(route_id_, url, &result, proxy_list)); + return result; +} + void WebPluginProxy::SetCookie(const GURL& url, const GURL& first_party_for_cookies, const std::string& cookie) { diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h index 757802a..df1b880 100644 --- a/content/plugin/webplugin_proxy.h +++ b/content/plugin/webplugin_proxy.h @@ -73,6 +73,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin { virtual void InvalidateRect(const gfx::Rect& rect); virtual NPObject* GetWindowScriptNPObject(); virtual NPObject* GetPluginElement(); + virtual bool FindProxyForUrl(const GURL& url, std::string* proxy_list); virtual void SetCookie(const GURL& url, const GURL& first_party_for_cookies, const std::string& cookie); |