2008-06-11 19:50:15 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et: */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2008-06-11 20:29:39 -07:00
|
|
|
#import <SystemConfiguration/SystemConfiguration.h>
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
#include "nsISystemProxySettings.h"
|
2010-06-22 10:05:00 -07:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
2008-06-11 19:50:15 -07:00
|
|
|
#include "nsIServiceManager.h"
|
|
|
|
#include "nsPrintfCString.h"
|
2015-07-06 19:17:00 -07:00
|
|
|
#include "nsNetCID.h"
|
2008-06-11 19:50:15 -07:00
|
|
|
#include "nsISupportsPrimitives.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsObjCExceptions.h"
|
2012-07-18 09:12:55 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2008-06-11 19:50:15 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
class nsOSXSystemProxySettings final : public nsISystemProxySettings {
|
2008-06-11 19:50:15 -07:00
|
|
|
public:
|
2013-07-18 19:24:15 -07:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2008-06-11 19:50:15 -07:00
|
|
|
NS_DECL_NSISYSTEMPROXYSETTINGS
|
|
|
|
|
|
|
|
nsOSXSystemProxySettings();
|
|
|
|
nsresult Init();
|
|
|
|
|
|
|
|
// called by OSX when the proxy settings have changed
|
|
|
|
void ProxyHasChanged();
|
|
|
|
|
|
|
|
// is there a PAC url specified in the system configuration
|
2011-09-28 23:19:26 -07:00
|
|
|
bool IsAutoconfigEnabled() const;
|
2008-06-11 19:50:15 -07:00
|
|
|
// retrieve the pac url
|
2012-09-01 19:35:17 -07:00
|
|
|
nsresult GetAutoconfigURL(nsAutoCString& aResult) const;
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
// Find the SystemConfiguration proxy & port for a given URI
|
2012-09-14 13:27:46 -07:00
|
|
|
nsresult FindSCProxyPort(const nsACString &aScheme, nsACString& aResultHost, int32_t& aResultPort, bool& aResultSocksProxy);
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
// is host:port on the proxy exception list?
|
2011-09-28 23:19:26 -07:00
|
|
|
bool IsInExceptionList(const nsACString& aHost) const;
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
~nsOSXSystemProxySettings();
|
|
|
|
|
|
|
|
SCDynamicStoreContext mContext;
|
|
|
|
SCDynamicStoreRef mSystemDynamicStore;
|
|
|
|
NSDictionary* mProxyDict;
|
|
|
|
|
|
|
|
|
|
|
|
// Mapping of URI schemes to SystemConfiguration keys
|
|
|
|
struct SchemeMapping {
|
|
|
|
const char* mScheme;
|
|
|
|
CFStringRef mEnabled;
|
|
|
|
CFStringRef mHost;
|
|
|
|
CFStringRef mPort;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mIsSocksProxy;
|
2008-06-11 19:50:15 -07:00
|
|
|
};
|
|
|
|
static const SchemeMapping gSchemeMappingList[];
|
|
|
|
};
|
|
|
|
|
2014-04-27 00:06:00 -07:00
|
|
|
NS_IMPL_ISUPPORTS(nsOSXSystemProxySettings, nsISystemProxySettings)
|
2012-09-14 13:27:46 -07:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsOSXSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
|
|
|
|
{
|
2013-01-11 12:00:49 -08:00
|
|
|
*aMainThreadOnly = true;
|
2012-09-14 13:27:46 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
// Mapping of URI schemes to SystemConfiguration keys
|
|
|
|
const nsOSXSystemProxySettings::SchemeMapping nsOSXSystemProxySettings::gSchemeMappingList[] = {
|
2011-10-17 07:59:28 -07:00
|
|
|
{"http", kSCPropNetProxiesHTTPEnable, kSCPropNetProxiesHTTPProxy, kSCPropNetProxiesHTTPPort, false},
|
|
|
|
{"https", kSCPropNetProxiesHTTPSEnable, kSCPropNetProxiesHTTPSProxy, kSCPropNetProxiesHTTPSPort, false},
|
|
|
|
{"ftp", kSCPropNetProxiesFTPEnable, kSCPropNetProxiesFTPProxy, kSCPropNetProxiesFTPPort, false},
|
|
|
|
{"socks", kSCPropNetProxiesSOCKSEnable, kSCPropNetProxiesSOCKSProxy, kSCPropNetProxiesSOCKSPort, true},
|
|
|
|
{NULL, NULL, NULL, NULL, false},
|
2008-06-11 19:50:15 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
ProxyHasChangedWrapper(SCDynamicStoreRef aStore, CFArrayRef aChangedKeys, void* aInfo)
|
|
|
|
{
|
|
|
|
static_cast<nsOSXSystemProxySettings*>(aInfo)->ProxyHasChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nsOSXSystemProxySettings::nsOSXSystemProxySettings()
|
|
|
|
: mSystemDynamicStore(NULL), mProxyDict(NULL)
|
|
|
|
{
|
|
|
|
mContext = (SCDynamicStoreContext){0, this, NULL, NULL, NULL};
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsOSXSystemProxySettings::Init()
|
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
|
|
|
|
// Register for notification of proxy setting changes
|
|
|
|
// See: http://developer.apple.com/documentation/Networking/Conceptual/CFNetwork/CFStreamTasks/chapter_4_section_5.html
|
|
|
|
mSystemDynamicStore = SCDynamicStoreCreate(NULL, CFSTR("Mozilla"), ProxyHasChangedWrapper, &mContext);
|
|
|
|
if (!mSystemDynamicStore)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
// Set up the store to monitor any changes to the proxies
|
|
|
|
CFStringRef proxiesKey = SCDynamicStoreKeyCreateProxies(NULL);
|
|
|
|
if (!proxiesKey)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
CFArrayRef keyArray = CFArrayCreate(NULL, (const void**)(&proxiesKey), 1, &kCFTypeArrayCallBacks);
|
|
|
|
CFRelease(proxiesKey);
|
|
|
|
if (!keyArray)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
SCDynamicStoreSetNotificationKeys(mSystemDynamicStore, keyArray, NULL);
|
|
|
|
CFRelease(keyArray);
|
|
|
|
|
|
|
|
// Add the dynamic store to the run loop
|
|
|
|
CFRunLoopSourceRef storeRLSource = SCDynamicStoreCreateRunLoopSource(NULL, mSystemDynamicStore, 0);
|
|
|
|
if (!storeRLSource)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
CFRunLoopAddSource(CFRunLoopGetCurrent(), storeRLSource, kCFRunLoopCommonModes);
|
|
|
|
CFRelease(storeRLSource);
|
|
|
|
|
|
|
|
// Load the initial copy of proxy info
|
|
|
|
mProxyDict = (NSDictionary*)SCDynamicStoreCopyProxies(mSystemDynamicStore);
|
|
|
|
if (!mProxyDict)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsOSXSystemProxySettings::~nsOSXSystemProxySettings()
|
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
|
|
|
|
|
|
|
[mProxyDict release];
|
|
|
|
|
|
|
|
if (mSystemDynamicStore) {
|
|
|
|
// Invalidate the dynamic store's run loop source
|
|
|
|
// to get the store out of the run loop
|
|
|
|
CFRunLoopSourceRef rls = SCDynamicStoreCreateRunLoopSource(NULL, mSystemDynamicStore, 0);
|
|
|
|
if (rls) {
|
|
|
|
CFRunLoopSourceInvalidate(rls);
|
|
|
|
CFRelease(rls);
|
|
|
|
}
|
|
|
|
CFRelease(mSystemDynamicStore);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
nsOSXSystemProxySettings::ProxyHasChanged()
|
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
|
|
|
|
|
|
|
[mProxyDict release];
|
|
|
|
mProxyDict = (NSDictionary*)SCDynamicStoreCopyProxies(mSystemDynamicStore);
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2012-09-14 13:27:46 -07:00
|
|
|
nsOSXSystemProxySettings::FindSCProxyPort(const nsACString &aScheme, nsACString& aResultHost, int32_t& aResultPort, bool& aResultSocksProxy)
|
2008-06-11 19:50:15 -07:00
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
|
|
|
|
NS_ENSURE_TRUE(mProxyDict != NULL, NS_ERROR_FAILURE);
|
|
|
|
|
|
|
|
for (const SchemeMapping* keys = gSchemeMappingList; keys->mScheme != NULL; ++keys) {
|
2009-06-26 11:52:24 -07:00
|
|
|
// Check for matching scheme (when appropriate)
|
2012-09-14 13:27:46 -07:00
|
|
|
if (strcasecmp(keys->mScheme, PromiseFlatCString(aScheme).get()) &&
|
|
|
|
!keys->mIsSocksProxy)
|
2008-06-11 19:50:15 -07:00
|
|
|
continue;
|
|
|
|
|
|
|
|
// Check the proxy is enabled
|
|
|
|
NSNumber* enabled = [mProxyDict objectForKey:(NSString*)keys->mEnabled];
|
|
|
|
NS_ENSURE_TRUE(enabled == NULL || [enabled isKindOfClass:[NSNumber class]], NS_ERROR_FAILURE);
|
|
|
|
if ([enabled intValue] == 0)
|
2009-06-26 11:52:24 -07:00
|
|
|
continue;
|
|
|
|
|
2008-06-11 19:50:15 -07:00
|
|
|
// Get the proxy host
|
|
|
|
NSString* host = [mProxyDict objectForKey:(NSString*)keys->mHost];
|
|
|
|
if (host == NULL)
|
|
|
|
break;
|
|
|
|
NS_ENSURE_TRUE([host isKindOfClass:[NSString class]], NS_ERROR_FAILURE);
|
|
|
|
aResultHost.Assign([host UTF8String]);
|
|
|
|
|
|
|
|
// Get the proxy port
|
|
|
|
NSNumber* port = [mProxyDict objectForKey:(NSString*)keys->mPort];
|
|
|
|
NS_ENSURE_TRUE([port isKindOfClass:[NSNumber class]], NS_ERROR_FAILURE);
|
|
|
|
aResultPort = [port intValue];
|
|
|
|
|
2009-06-26 11:52:24 -07:00
|
|
|
aResultSocksProxy = keys->mIsSocksProxy;
|
|
|
|
|
2008-06-11 19:50:15 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool
|
2008-06-11 19:50:15 -07:00
|
|
|
nsOSXSystemProxySettings::IsAutoconfigEnabled() const
|
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
|
|
|
|
|
|
|
NSNumber* value = [mProxyDict objectForKey:(NSString*)kSCPropNetProxiesProxyAutoConfigEnable];
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_ENSURE_TRUE(value == NULL || [value isKindOfClass:[NSNumber class]], false);
|
2008-06-11 19:50:15 -07:00
|
|
|
return ([value intValue] != 0);
|
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
2008-06-11 19:50:15 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2012-09-01 19:35:17 -07:00
|
|
|
nsOSXSystemProxySettings::GetAutoconfigURL(nsAutoCString& aResult) const
|
2008-06-11 19:50:15 -07:00
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
|
|
|
|
NSString* value = [mProxyDict objectForKey:(NSString*)kSCPropNetProxiesProxyAutoConfigURLString];
|
|
|
|
if (value != NULL) {
|
|
|
|
NS_ENSURE_TRUE([value isKindOfClass:[NSString class]], NS_ERROR_FAILURE);
|
|
|
|
aResult.Assign([value UTF8String]);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool
|
2009-05-06 13:44:11 -07:00
|
|
|
IsHostProxyEntry(const nsACString& aHost, const nsACString& aOverride)
|
2008-06-11 19:50:15 -07:00
|
|
|
{
|
2012-09-01 19:35:17 -07:00
|
|
|
nsAutoCString host(aHost);
|
|
|
|
nsAutoCString override(aOverride);
|
2009-05-06 13:44:11 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t overrideLength = override.Length();
|
|
|
|
int32_t tokenStart = 0;
|
|
|
|
int32_t offset = 0;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool star = false;
|
2009-05-06 13:44:11 -07:00
|
|
|
|
|
|
|
while (tokenStart < overrideLength) {
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t tokenEnd = override.FindChar('*', tokenStart);
|
2009-05-06 13:44:11 -07:00
|
|
|
if (tokenEnd == tokenStart) {
|
|
|
|
// Star is the first character in the token.
|
2011-10-17 07:59:28 -07:00
|
|
|
star = true;
|
2009-05-06 13:44:11 -07:00
|
|
|
tokenStart++;
|
|
|
|
// If the character following the '*' is a '.' character then skip
|
|
|
|
// it so that "*.foo.com" allows "foo.com".
|
|
|
|
if (override.FindChar('.', tokenStart) == tokenStart)
|
|
|
|
tokenStart++;
|
|
|
|
} else {
|
|
|
|
if (tokenEnd == -1)
|
|
|
|
tokenEnd = overrideLength; // no '*' char, match rest of string
|
2012-09-01 19:35:17 -07:00
|
|
|
nsAutoCString token(Substring(override, tokenStart, tokenEnd - tokenStart));
|
2009-05-06 13:44:11 -07:00
|
|
|
offset = host.Find(token, offset);
|
|
|
|
if (offset == -1 || (!star && offset))
|
2011-10-17 07:59:28 -07:00
|
|
|
return false;
|
|
|
|
star = false;
|
2009-05-06 13:44:11 -07:00
|
|
|
tokenStart = tokenEnd;
|
|
|
|
offset += token.Length();
|
2008-06-11 19:50:15 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
return (star || (offset == static_cast<int32_t>(host.Length())));
|
2008-06-11 19:50:15 -07:00
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool
|
2009-05-06 13:44:11 -07:00
|
|
|
nsOSXSystemProxySettings::IsInExceptionList(const nsACString& aHost) const
|
2008-06-11 19:50:15 -07:00
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_ENSURE_TRUE(mProxyDict != NULL, false);
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
NSArray* exceptionList = [mProxyDict objectForKey:(NSString*)kSCPropNetProxiesExceptionsList];
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_ENSURE_TRUE(exceptionList == NULL || [exceptionList isKindOfClass:[NSArray class]], false);
|
2008-06-11 19:50:15 -07:00
|
|
|
|
|
|
|
NSEnumerator* exceptionEnumerator = [exceptionList objectEnumerator];
|
|
|
|
NSString* currentValue = NULL;
|
|
|
|
while ((currentValue = [exceptionEnumerator nextObject])) {
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_ENSURE_TRUE([currentValue isKindOfClass:[NSString class]], false);
|
2012-09-01 19:35:17 -07:00
|
|
|
nsAutoCString overrideStr([currentValue UTF8String]);
|
2009-05-06 13:44:11 -07:00
|
|
|
if (IsHostProxyEntry(aHost, overrideStr))
|
2011-10-17 07:59:28 -07:00
|
|
|
return true;
|
2008-06-11 19:50:15 -07:00
|
|
|
}
|
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
2008-06-11 19:50:15 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsOSXSystemProxySettings::GetPACURI(nsACString& aResult)
|
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
|
|
|
|
NS_ENSURE_TRUE(mProxyDict != NULL, NS_ERROR_FAILURE);
|
|
|
|
|
2012-09-01 19:35:17 -07:00
|
|
|
nsAutoCString pacUrl;
|
2008-06-11 19:50:15 -07:00
|
|
|
if (IsAutoconfigEnabled() && NS_SUCCEEDED(GetAutoconfigURL(pacUrl))) {
|
|
|
|
aResult.Assign(pacUrl);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2012-09-14 13:27:46 -07:00
|
|
|
nsOSXSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
|
|
|
|
const nsACString & aScheme,
|
|
|
|
const nsACString & aHost,
|
|
|
|
const int32_t aPort,
|
|
|
|
nsACString & aResult)
|
2008-06-11 19:50:15 -07:00
|
|
|
{
|
|
|
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t proxyPort;
|
2012-09-01 19:35:17 -07:00
|
|
|
nsAutoCString proxyHost;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool proxySocks;
|
2012-09-14 13:27:46 -07:00
|
|
|
nsresult rv = FindSCProxyPort(aScheme, proxyHost, proxyPort, proxySocks);
|
2008-06-11 19:50:15 -07:00
|
|
|
|
2012-09-14 13:27:46 -07:00
|
|
|
if (NS_FAILED(rv) || IsInExceptionList(aHost)) {
|
2008-06-11 19:50:15 -07:00
|
|
|
aResult.AssignLiteral("DIRECT");
|
2009-06-26 11:52:24 -07:00
|
|
|
} else if (proxySocks) {
|
|
|
|
aResult.Assign(NS_LITERAL_CSTRING("SOCKS ") + proxyHost + nsPrintfCString(":%d", proxyPort));
|
|
|
|
} else {
|
2008-06-11 19:50:15 -07:00
|
|
|
aResult.Assign(NS_LITERAL_CSTRING("PROXY ") + proxyHost + nsPrintfCString(":%d", proxyPort));
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
|
|
|
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define NS_OSXSYSTEMPROXYSERVICE_CID /* 9afcd4b8-2e0f-41f4-8f1f-3bf0d3cf67de */\
|
|
|
|
{ 0x9afcd4b8, 0x2e0f, 0x41f4, \
|
|
|
|
{ 0x8f, 0x1f, 0x3b, 0xf0, 0xd3, 0xcf, 0x67, 0xde } }
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsOSXSystemProxySettings, Init);
|
2010-06-22 10:05:00 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_OSXSYSTEMPROXYSERVICE_CID);
|
2008-06-11 19:50:15 -07:00
|
|
|
|
2010-06-22 10:05:00 -07:00
|
|
|
static const mozilla::Module::CIDEntry kOSXSysProxyCIDs[] = {
|
|
|
|
{ &kNS_OSXSYSTEMPROXYSERVICE_CID, false, NULL, nsOSXSystemProxySettingsConstructor },
|
|
|
|
{ NULL }
|
2008-06-11 19:50:15 -07:00
|
|
|
};
|
|
|
|
|
2010-06-22 10:05:00 -07:00
|
|
|
static const mozilla::Module::ContractIDEntry kOSXSysProxyContracts[] = {
|
|
|
|
{ NS_SYSTEMPROXYSETTINGS_CONTRACTID, &kNS_OSXSYSTEMPROXYSERVICE_CID },
|
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module kOSXSysProxyModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kOSXSysProxyCIDs,
|
|
|
|
kOSXSysProxyContracts
|
|
|
|
};
|
|
|
|
|
|
|
|
NSMODULE_DEFN(nsOSXProxyModule) = &kOSXSysProxyModule;
|