nsIPref is no longer passed around through inits on webshell, content viewers and presContext. In places where it is needed, it can be retrieved from the service manager. I removed a number of the getters and setters for prefs as the prefs will be the same from the service manager so we don't need getters. r=waterson a=rickg

git-svn-id: svn://10.0.0.236/trunk@62038 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-02 07:13:02 +00:00
parent 7932902c0f
commit 495826cccc
39 changed files with 58 additions and 264 deletions

View File

@@ -641,8 +641,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
nsresult rv_detect = NS_OK;
if(! gInitDetector)
{
nsIPref* pref = nsnull;
if(NS_SUCCEEDED(webShell->GetPrefs(pref)) && pref)
nsCOMPtr<nsIPref> pref(do_GetService(NS_PREF_PROGID));
if(pref)
{
char* detector_name = nsnull;
if(NS_SUCCEEDED(
@@ -656,7 +656,6 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
}
pref->RegisterCallback("intl.charset.detector", MyPrefChangedCallback, nsnull);
}
NS_IF_RELEASE(pref);
gInitDetector = PR_TRUE;
}