summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:02:20 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:41 +0100
commita94275402997c11dd2e778633dacf4b7e630a35d (patch)
treee66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
parent09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff)
downloadexternal_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebKit/mac/Plugins/WebBaseNetscapePluginView.mm')
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm60
1 files changed, 0 insertions, 60 deletions
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 4966716..708b017 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -960,66 +960,6 @@ String WebHaltablePlugin::pluginName() const
namespace WebKit {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-CString proxiesForURL(NSURL *url)
-{
- RetainPtr<CFDictionaryRef> systemProxies(AdoptCF, CFNetworkCopySystemProxySettings());
- if (!systemProxies)
- return "DIRECT";
-
- RetainPtr<CFArrayRef> proxiesForURL(AdoptCF, CFNetworkCopyProxiesForURL((CFURLRef)url, systemProxies.get()));
- CFIndex proxyCount = proxiesForURL ? CFArrayGetCount(proxiesForURL.get()) : 0;
- if (!proxyCount)
- return "DIRECT";
-
- // proxiesForURL is a CFArray of CFDictionaries. Each dictionary represents a proxy.
- // The format of the result should be:
- // "PROXY host[:port]" (for HTTP proxy) or
- // "SOCKS host[:port]" (for SOCKS proxy) or
- // A combination of the above, separated by semicolon, in the order that they should be tried.
- String proxies;
- for (CFIndex i = 0; i < proxyCount; ++i) {
- CFDictionaryRef proxy = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(proxiesForURL.get(), i));
- if (!proxy)
- continue;
-
- CFStringRef type = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyTypeKey));
- bool isHTTP = type == kCFProxyTypeHTTP || type == kCFProxyTypeHTTPS;
- bool isSOCKS = type == kCFProxyTypeSOCKS;
-
- // We can only report HTTP and SOCKS proxies.
- if (!isHTTP && !isSOCKS)
- continue;
-
- CFStringRef host = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyHostNameKey));
- CFNumberRef port = static_cast<CFNumberRef>(CFDictionaryGetValue(proxy, kCFProxyPortNumberKey));
-
- // If we are inserting multiple entries, add a separator
- if (!proxies.isEmpty())
- proxies += ";";
-
- if (isHTTP)
- proxies += "PROXY ";
- else if (isSOCKS)
- proxies += "SOCKS ";
-
- proxies += host;
-
- if (port) {
- SInt32 intPort;
- CFNumberGetValue(port, kCFNumberSInt32Type, &intPort);
-
- proxies += ":" + String::number(intPort);
- }
- }
-
- if (proxies.isEmpty())
- return "DIRECT";
-
- return proxies.utf8();
-}
-#endif
-
bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
CString& username, CString& password)
{