184257 - Updating pref callers. r=timeless sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@135983 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
caillon%returnzero.com
2003-01-08 08:40:41 +00:00
parent 577850124a
commit 360f61e8a1
23 changed files with 100 additions and 144 deletions

View File

@@ -42,9 +42,12 @@
/////////////////////////////////////////////////////
//
// This file implements the nsScriptablePeer object
// The naive methods of this class are supposed to
// The native methods of this class are supposed to
// be callable from JavaScript
//
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
#include "plugin.h"
@@ -306,11 +309,11 @@ char* URLName;
NS_IMETHODIMP nsScriptablePeer::SetBoolPref(const PRUnichar *aPrefName, PRBool aVal)
{
nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID));
if (prefs) {
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch) {
nsCString prefName;
prefName.AssignWithConversion(aPrefName);
prefs->SetBoolPref(prefName.get(), aVal);
prefBranch->SetBoolPref(prefName.get(), aVal);
return NS_OK;
} else {
return NS_ERROR_FAILURE;

View File

@@ -56,7 +56,6 @@
#include "nsMemory.h"
#include "nsNetUtil.h"
#include "nsString.h"
#include "nsIPref.h"
class nsPluginInstance;
@@ -107,4 +106,4 @@ protected:
};
#endif
#endif

View File

@@ -46,7 +46,6 @@
#include "nsMemory.h"
#include "nsNetUtil.h"
#include "nsString.h"
#include "nsIPref.h"
// service manager which will give the access to all public browser services
// we will use memory service as an illustration

View File

@@ -62,7 +62,6 @@
#include "nsLayoutCID.h"
#include "nsNetUtil.h"
#include "nsIFile.h"
#include "nsIPref.h"
NS_IMPL_ISUPPORTS1(nsDebugObject, nsIDebugObject)

View File

@@ -62,7 +62,6 @@
#include "nsLayoutCID.h"
#include "nsNetUtil.h"
#include "nsIFile.h"
#include "nsIPref.h"
NS_IMPL_ISUPPORTS1(nsDebugObject, nsIDebugObject)