mozilla - added mkprefs.h to the builds and replaced "*" pref strings with #defines.
nglayout - added get & set methods for http proxies to nsINetService. git-svn-id: svn://10.0.0.236/trunk@10714 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#define alphabetize 1
|
||||
#include "rosetta.h"
|
||||
#include "xp.h"
|
||||
#include "mkprefs.h"
|
||||
#include "netutils.h"
|
||||
#include "mkselect.h"
|
||||
#include "mktcp.h"
|
||||
@@ -153,11 +154,6 @@ PRIVATE NET_CookieBehaviorEnum net_CookieBehavior = NET_Accept;
|
||||
PRIVATE Bool net_WarnAboutCookies = FALSE;
|
||||
PRIVATE char *net_scriptName = (char *)0;
|
||||
|
||||
static const char *pref_cookieBehavior = "network.cookie.cookieBehavior";
|
||||
static const char *pref_warnAboutCookies = "network.cookie.warnAboutCookies";
|
||||
static const char *pref_scriptName = "network.cookie.filterName";
|
||||
|
||||
|
||||
/*
|
||||
* Different schemes supported by the client.
|
||||
* Order means the order of preference between authentication schemes.
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "mkpadpac.h"
|
||||
#include "prerror.h"
|
||||
#include "net_xp_file.h"
|
||||
#include "mkprefs.h"
|
||||
|
||||
#include "merrors.h"
|
||||
|
||||
@@ -366,7 +367,7 @@ net_check_for_company_hostname(ActiveEntry *ce)
|
||||
Bool add_com = FALSE;
|
||||
Bool goBrowsing = FALSE;
|
||||
|
||||
if (PREF_GetBoolPref("browser.goBrowsing.enabled", &goBrowsing) != PREF_OK) goBrowsing = 0;
|
||||
if (PREF_GetBoolPref(pref_goBrowsingEnabled, &goBrowsing) != PREF_OK) goBrowsing = 0;
|
||||
|
||||
if(!cd->orig_host) {
|
||||
char *dot=NULL;
|
||||
@@ -398,7 +399,7 @@ net_check_for_company_hostname(ActiveEntry *ce)
|
||||
/* no dots in hostname */
|
||||
if (goBrowsing && !PL_strchr(ce->URL_s->address, '/')) {
|
||||
char *pUrl;
|
||||
if ( (PREF_OK == PREF_CopyCharPref("network.search.url",&pUrl))
|
||||
if ( (PREF_OK == PREF_CopyCharPref(pref_searchUrl,&pUrl))
|
||||
&& pUrl) {
|
||||
char *tmp = NET_ParseURL(ce->URL_s->address, GET_HOST_PART);
|
||||
char* new_address = PR_smprintf("%sgo+%s", pUrl, tmp);
|
||||
@@ -3677,13 +3678,11 @@ net_CleanupHTTP(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#define REFERER_HEADER_PREF "network.sendRefererHeader"
|
||||
|
||||
PRIVATE void
|
||||
HTTP_ReadPrefs(void)
|
||||
{
|
||||
XP_Bool b;
|
||||
if ( (PREF_OK != PREF_GetBoolPref("network.sendRefererHeader", &b)) ) {
|
||||
if ( (PREF_OK != PREF_GetBoolPref(pref_sendRefererHeader, &b)) ) {
|
||||
b = TRUE;
|
||||
}
|
||||
NET_SetSendRefererHeader(b);
|
||||
@@ -3699,7 +3698,7 @@ PRIVATE void
|
||||
HTTP_InitPrefs(void)
|
||||
{
|
||||
HTTP_ReadPrefs();
|
||||
PREF_RegisterCallback(REFERER_HEADER_PREF ,HTTP_PrefChangedFunc,NULL);
|
||||
PREF_RegisterCallback(pref_sendRefererHeader ,HTTP_PrefChangedFunc,NULL);
|
||||
}
|
||||
|
||||
#define HTTP_SCHEME "http:"
|
||||
|
||||
Reference in New Issue
Block a user