diff --git a/modules/plugin/base/src/ns4xPlugin.cpp b/modules/plugin/base/src/ns4xPlugin.cpp index 38f6210cb484..9d34d886aa39 100644 --- a/modules/plugin/base/src/ns4xPlugin.cpp +++ b/modules/plugin/base/src/ns4xPlugin.cpp @@ -48,7 +48,8 @@ #include "nsIPluginStreamListener.h" #include "nsPluginsDir.h" #include "nsPluginSafety.h" -#include "nsIPref.h" +#include "nsIPrefService.h" +#include "nsIPrefBranch.h" #include "nsPluginLogging.h" #include "nsIPluginInstancePeer2.h" @@ -91,7 +92,6 @@ enum eNPPStreamTypeInternal { //////////////////////////////////////////////////////////////////////// // CID's && IID's -static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID); static NS_DEFINE_IID(kPluginManagerCID, NS_PLUGINMANAGER_CID); static NS_DEFINE_IID(kMemoryCID, NS_MEMORY_CID); @@ -1796,8 +1796,8 @@ _getvalue(NPP npp, NPNVariable variable, void *result) #endif case NPNVjavascriptEnabledBool: { - *(NPBool*)result = PR_FALSE; - nsCOMPtr prefs(do_GetService(kPrefServiceCID)); + *(NPBool*)result = PR_FALSE; + nsCOMPtr prefs(do_GetService(NS_PREFSERVICE_CONTRACTID)); if(prefs) { PRBool js = PR_FALSE;; res = prefs->GetBoolPref("javascript.enabled", &js); diff --git a/modules/plugin/base/src/nsPluginDirServiceProvider.cpp b/modules/plugin/base/src/nsPluginDirServiceProvider.cpp index 0e8edb6bb28b..71322711c1ac 100644 --- a/modules/plugin/base/src/nsPluginDirServiceProvider.cpp +++ b/modules/plugin/base/src/nsPluginDirServiceProvider.cpp @@ -40,7 +40,8 @@ #include "nsCRT.h" #include "nsILocalFile.h" -#include "nsIPref.h" +#include "nsIPrefBranch.h" +#include "nsIPrefService.h" #include "nsDependentString.h" #include "nsXPIDLString.h" #include "prmem.h" @@ -214,7 +215,7 @@ nsPluginDirServiceProvider::GetFile(const char *prop, PRBool *persistant, nsIFil *persistant = PR_TRUE; #if defined(XP_WIN) - nsCOMPtr prefs = do_GetService(NS_PREF_CONTRACTID); + nsCOMPtr prefs(do_GetService(NS_PREFSERVICE_CONTRACTID)) if (!prefs) return rv; if (nsCRT::strcmp(prop, NS_WIN_4DOTX_SCAN_KEY) == 0) { diff --git a/modules/plugin/base/src/nsPluginsDirUnix.cpp b/modules/plugin/base/src/nsPluginsDirUnix.cpp index 86f804a7c85d..a52a46bff6db 100644 --- a/modules/plugin/base/src/nsPluginsDirUnix.cpp +++ b/modules/plugin/base/src/nsPluginsDirUnix.cpp @@ -58,8 +58,8 @@ #include #include "nsString.h" #include "nsILocalFile.h" -#include "nsIPref.h" -static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); +#include "nsIPrefBranch.h" +#include "nsIPrefService.h" #define LOCAL_PLUGIN_DLL_SUFFIX ".so" #if defined(__hpux) @@ -156,12 +156,12 @@ static void LoadExtraSharedLibs() { // check out if user's prefs.js has libs name nsresult res; - nsCOMPtr prefs = do_GetService(kPrefServiceCID, &res); + nsCOMPtr prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &res)); if (NS_SUCCEEDED(res) && (prefs != nsnull)) { char *sonamesListFromPref = PREF_PLUGINS_SONAME; char *sonameList = NULL; PRBool prefSonameListIsSet = PR_TRUE; - res = prefs->CopyCharPref(sonamesListFromPref, &sonameList); + res = prefs->GetCharPref(sonamesListFromPref, &sonameList); if (!sonameList) { // pref is not set, lets use hardcoded list prefSonameListIsSet = PR_FALSE;