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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDebugObject, nsIDebugObject)
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDebugObject, nsIDebugObject)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user