Bug 275614 xpfe/bootstrap should not use nsIPref
r=neil sr=alecf
This commit is contained in:
Родитель
57e2a66ece
Коммит
a9742b7648
|
@ -47,7 +47,6 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
#include "nsIXULWindow.h"
|
||||
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
#include "private/pprthred.h"
|
||||
#endif
|
||||
|
||||
#include "nsIPref.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "plevent.h"
|
||||
#include "prmem.h"
|
||||
|
@ -799,7 +800,7 @@ static nsresult DoOnShutdown()
|
|||
// save the prefs, in case they weren't saved
|
||||
{
|
||||
// scoping this in a block to force release
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));
|
||||
nsCOMPtr<nsIPrefService> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get prefs, so unable to save them");
|
||||
if (NS_SUCCEEDED(rv))
|
||||
prefs->SavePrefFile(nsnull);
|
||||
|
@ -867,7 +868,7 @@ static nsresult InstallGlobalLocale(nsICmdLineService *cmdLineArgs)
|
|||
nsresult rv = NS_OK;
|
||||
|
||||
// check the pref first
|
||||
nsCOMPtr<nsIPref> prefService(do_GetService(NS_PREF_CONTRACTID));
|
||||
nsCOMPtr<nsIPrefBranch> prefService(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
PRBool matchOS = PR_FALSE;
|
||||
if (prefService)
|
||||
prefService->GetBoolPref(kMatchOSLocalePref, &matchOS);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -72,7 +71,8 @@
|
|||
#include "nsIXULWindow.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPromptService.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
@ -2442,7 +2442,7 @@ nsNativeAppSupportOS2::OnLastWindowClosing() {
|
|||
// check for multi-profile situation and turn off turbo mode
|
||||
// if there are multiple profiles.
|
||||
PRBool singleProfileOnly = PR_FALSE;
|
||||
nsCOMPtr<nsIPref> prefService( do_GetService( NS_PREF_CONTRACTID, &rv ) );
|
||||
nsCOMPtr<nsIPrefBranch> prefService( do_GetService( NS_PREFSERVICE_CONTRACTID, &rv ) );
|
||||
if ( NS_SUCCEEDED( rv ) ) {
|
||||
prefService->GetBoolPref( "browser.turbo.singleProfileOnly", &singleProfileOnly );
|
||||
}
|
||||
|
|
|
@ -65,7 +65,8 @@
|
|||
#include "nsIXULWindow.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIWindowsHooks.h"
|
||||
#include "nsIPromptService.h"
|
||||
#include "nsNetCID.h"
|
||||
|
@ -2056,7 +2057,7 @@ nsNativeAppSupportWin::EnsureProfile(nsICmdLineService* args)
|
|||
if ( firstTime ) {
|
||||
firstTime = PR_FALSE;
|
||||
// Check pref for whether to set ddeexec subkey entries.
|
||||
nsCOMPtr<nsIPref> prefService( do_GetService( NS_PREF_CONTRACTID ) );
|
||||
nsCOMPtr<nsIPrefBranch> prefService( do_GetService( NS_PREFSERVICE_CONTRACTID ) );
|
||||
PRBool supportDDEExec = PR_FALSE;
|
||||
if ( prefService ) {
|
||||
prefService->GetBoolPref( "advanced.system.supportDDEExec", &supportDDEExec );
|
||||
|
@ -2592,7 +2593,7 @@ nsNativeAppSupportWin::OnLastWindowClosing() {
|
|||
// check for multi-profile situation and turn off turbo mode
|
||||
// if there are multiple profiles.
|
||||
PRBool singleProfileOnly = PR_FALSE;
|
||||
nsCOMPtr<nsIPref> prefService( do_GetService( NS_PREF_CONTRACTID, &rv ) );
|
||||
nsCOMPtr<nsIPrefBranch> prefService( do_GetService( NS_PREFSERVICE_CONTRACTID, &rv ) );
|
||||
if ( NS_SUCCEEDED( rv ) ) {
|
||||
prefService->GetBoolPref( "browser.turbo.singleProfileOnly", &singleProfileOnly );
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче