Bug 907812 - define kProxyType_FOO as char[] rather than char*; r=jduell

This commit is contained in:
Nathan Froyd 2013-08-21 13:21:40 -04:00
parent d4d9c59385
commit 39638d0e86
2 changed files with 20 additions and 12 deletions

View File

@ -32,6 +32,14 @@
//----------------------------------------------------------------------------
namespace mozilla {
extern const char kProxyType_HTTP[];
extern const char kProxyType_SOCKS[];
extern const char kProxyType_SOCKS4[];
extern const char kProxyType_SOCKS5[];
extern const char kProxyType_DIRECT[];
}
using namespace mozilla;
#include "prlog.h"
@ -649,13 +657,13 @@ nsProtocolProxyService::CanUseProxy(nsIURI *aURI, int32_t defaultPort)
// kProxyType\* may be referred to externally in
// nsProxyInfo in order to compare by string pointer
namespace mozilla {
const char *kProxyType_HTTP = "http";
const char *kProxyType_PROXY = "proxy";
const char *kProxyType_SOCKS = "socks";
const char *kProxyType_SOCKS4 = "socks4";
const char *kProxyType_SOCKS5 = "socks5";
const char *kProxyType_DIRECT = "direct";
const char *kProxyType_UNKNOWN = "unknown";
const char kProxyType_HTTP[] = "http";
const char kProxyType_PROXY[] = "proxy";
const char kProxyType_SOCKS[] = "socks";
const char kProxyType_SOCKS4[] = "socks4";
const char kProxyType_SOCKS5[] = "socks5";
const char kProxyType_DIRECT[] = "direct";
const char kProxyType_UNKNOWN[] = "unknown";
}
const char *

View File

@ -74,11 +74,11 @@ nsProxyInfo::SetFailoverProxy(nsIProxyInfo *proxy)
// These pointers are declared in nsProtocolProxyService.cpp and
// comparison of mType by string pointer is valid within necko
namespace mozilla {
extern const char *kProxyType_HTTP;
extern const char *kProxyType_SOCKS;
extern const char *kProxyType_SOCKS4;
extern const char *kProxyType_SOCKS5;
extern const char *kProxyType_DIRECT;
extern const char kProxyType_HTTP[];
extern const char kProxyType_SOCKS[];
extern const char kProxyType_SOCKS4[];
extern const char kProxyType_SOCKS5[];
extern const char kProxyType_DIRECT[];
}
bool