From fc4099e666b535bbe1e7531bbd9d9cd26fe3fd23 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Fri, 25 Feb 2005 20:46:35 +0000 Subject: [PATCH] Bug 281414 - global s/nsIPrefBranchInternal/nsIPrefBranch2/ rs=darin (did not change backwards-compatible code in extensions/irc extensions/venkman or extensions/inspector) git-svn-id: svn://10.0.0.236/trunk@169868 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 4 ++-- .../components/bookmarks/content/bookmarksTree.xml | 4 ++-- mozilla/calendar/resources/content/attachFile.js | 2 +- mozilla/calendar/resources/content/calendar.js | 4 ++-- .../resources/content/pref/rootCalendarPref.js | 4 ++-- mozilla/caps/src/nsScriptSecurityManager.cpp | 4 ++-- mozilla/chrome/src/nsChromeRegistry.cpp | 8 ++++---- mozilla/content/events/src/nsEventStateManager.cpp | 6 +++--- mozilla/editor/ui/composer/content/editor.js | 4 ++-- .../browser/activex/src/plugin/PrefObserver.cpp | 4 ++-- .../browser/activex/src/plugin/nsAxSecurityPolicy.js | 2 +- mozilla/extensions/cookie/nsCookiePermission.cpp | 4 ++-- mozilla/extensions/cookie/nsImgManager.cpp | 4 ++-- mozilla/extensions/cookie/nsPopupWindowManager.cpp | 4 ++-- .../extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp | 4 ++-- mozilla/extensions/p3p/src/nsP3PService.cpp | 4 ++-- mozilla/extensions/permissions/nsContentBlocker.h | 4 ++-- .../permissions/nsMailnewsContentBlocker.cpp | 4 ++-- .../spellcheck/src/mozPersonalDictionary.cpp | 2 +- .../extensions/typeaheadfind/src/nsTypeAheadFind.cpp | 6 +++--- .../webservices/security/src/nsWebScriptsAccess.cpp | 2 +- mozilla/gfx/src/qt/nsDeviceContextQt.cpp | 6 +++--- mozilla/layout/generic/nsImageFrame.cpp | 4 ++-- mozilla/mail/base/content/ABSearchDialog.js | 2 +- mozilla/mail/base/content/msgMail3PaneWindow.js | 4 ++-- mozilla/mail/base/content/nsContextMenu.js | 2 +- .../mail/components/addrbook/content/addressbook.js | 4 ++-- .../components/compose/content/MsgComposeCommands.js | 2 +- .../mailnews/addrbook/resources/content/addressbook.js | 4 ++-- mozilla/mailnews/addrbook/src/nsAbAddressCollecter.cpp | 8 ++++---- mozilla/mailnews/addrbook/src/nsAbView.cpp | 10 +++++----- mozilla/mailnews/base/resources/content/mailWindow.js | 4 ++-- .../base/resources/content/msgMail3PaneWindow.js | 2 +- .../base/search/resources/content/ABSearchDialog.js | 2 +- mozilla/mailnews/base/src/nsMessenger.cpp | 4 ++-- mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp | 6 +++--- mozilla/mailnews/base/src/nsMsgContentPolicy.cpp | 8 ++++---- mozilla/mailnews/base/src/nsMsgDBView.cpp | 6 +++--- .../compose/resources/content/MsgComposeCommands.js | 2 +- mozilla/mailnews/compose/src/nsMsgComposeService.cpp | 4 ++-- mozilla/mailnews/db/msgdb/src/nsDBFolderInfo.cpp | 6 +++--- .../resources/content/msgViewPickerOverlay.js | 4 ++-- mozilla/modules/oji/src/nsJVMManager.cpp | 4 ++-- mozilla/netwerk/base/src/nsIOService.cpp | 8 ++++---- mozilla/netwerk/base/src/nsIOService.h | 4 ++-- mozilla/netwerk/base/src/nsProtocolProxyService.cpp | 4 ++-- mozilla/netwerk/base/src/nsStandardURL.cpp | 4 ++-- mozilla/netwerk/cache/src/nsCacheService.cpp | 6 +++--- mozilla/netwerk/cookie/src/nsCookieService.cpp | 4 ++-- mozilla/netwerk/dns/src/nsDNSService2.cpp | 4 ++-- mozilla/netwerk/dns/src/nsIDNService.cpp | 4 ++-- .../netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp | 4 ++-- mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp | 4 ++-- mozilla/security/manager/ssl/src/nsNSSComponent.cpp | 6 +++--- .../toolkit/components/history/src/nsGlobalHistory.cpp | 4 ++-- .../components/passwordmgr/base/nsPasswordManager.cpp | 4 ++-- .../toolkit/components/satchel/src/nsFormHistory.cpp | 4 ++-- .../components/typeaheadfind/content/findBar.js | 4 ++-- .../components/typeaheadfind/src/nsTypeAheadFind.cpp | 6 +++--- .../toolkit/components/viewconfig/content/config.js | 2 +- mozilla/toolkit/mozapps/downloads/content/downloads.js | 4 ++-- .../toolkit/mozapps/update/src/nsUpdateService.js.in | 4 ++-- mozilla/uriloader/prefetch/nsPrefetchService.cpp | 4 ++-- mozilla/xpfe/bootstrap/mozilla-bin.order | 2 +- mozilla/xpfe/browser/resources/content/navigator.js | 4 ++-- .../xpfe/browser/resources/content/urlbarBindings.xml | 8 ++++---- .../communicator/resources/content/nsContextMenu.js | 2 +- .../communicator/resources/content/utilityOverlay.js | 4 ++-- .../components/bookmarks/src/nsBookmarksService.cpp | 4 ++-- mozilla/xpfe/components/history/resources/history.js | 4 ++-- .../xpfe/components/history/src/nsGlobalHistory.cpp | 4 ++-- mozilla/xpfe/components/intl/nsCharsetMenu.cpp | 8 ++++---- .../xpfe/global/resources/content/bindings/toolbar.xml | 2 +- mozilla/xpfe/global/resources/content/config.js | 2 +- 74 files changed, 157 insertions(+), 157 deletions(-) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index dc848d3c3ff..5d8d8a99ff6 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -787,7 +787,7 @@ function delayedStartup() // Set up Sanitize Item gSanitizeListener = new SanitizeListener(); - var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranch2); // Enable/Disable Form Fill gFormFillPrefListener = new FormFillPrefListener(); @@ -909,7 +909,7 @@ function Shutdown() } try { - var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(gFormFillPrefListener.domain, gFormFillPrefListener); pbi.removeObserver(gURLBarAutoFillPrefListener.domain, gURLBarAutoFillPrefListener); pbi.removeObserver(gAutoHideTabbarPrefListener.domain, gAutoHideTabbarPrefListener); diff --git a/mozilla/browser/components/bookmarks/content/bookmarksTree.xml b/mozilla/browser/components/bookmarks/content/bookmarksTree.xml index a1275afe1a4..444333861af 100644 --- a/mozilla/browser/components/bookmarks/content/bookmarksTree.xml +++ b/mozilla/browser/components/bookmarks/content/bookmarksTree.xml @@ -95,7 +95,7 @@ const kPrefSvcIID = Components.interfaces.nsIPrefService; var prefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID); var prefs = prefSvc.getBranch(null); - const kPrefBranchInternalIID = Components.interfaces.nsIPrefBranchInternal; + const kPrefBranchInternalIID = Components.interfaces.nsIPrefBranch2; var bookmarksPrefsInternal = prefs.QueryInterface(kPrefBranchInternalIID); bookmarksPrefsInternal.addObserver(this.sortChangedObserver.domain, this.sortChangedObserver, false); @@ -141,7 +141,7 @@ const kPrefSvcIID = Components.interfaces.nsIPrefService; var prefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID); var prefs = prefSvc.getBranch(null); - const kPrefBranchInternalIID = Components.interfaces.nsIPrefBranchInternal; + const kPrefBranchInternalIID = Components.interfaces.nsIPrefBranch2; var bookmarksPrefsInternal = prefs.QueryInterface(kPrefBranchInternalIID); bookmarksPrefsInternal.removeObserver(this.sortChangedObserver.domain, this.sortChangedObserver); diff --git a/mozilla/calendar/resources/content/attachFile.js b/mozilla/calendar/resources/content/attachFile.js index 170f5686ee6..15fcbdedfd5 100644 --- a/mozilla/calendar/resources/content/attachFile.js +++ b/mozilla/calendar/resources/content/attachFile.js @@ -54,7 +54,7 @@ try { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); sPrefs = prefService.getBranch(null); - sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2); } catch (ex) { dump("failed to preferences services\n"); diff --git a/mozilla/calendar/resources/content/calendar.js b/mozilla/calendar/resources/content/calendar.js index 3a98fe5f093..6777f663379 100644 --- a/mozilla/calendar/resources/content/calendar.js +++ b/mozilla/calendar/resources/content/calendar.js @@ -244,7 +244,7 @@ function updateColors() // Setup css classes for category colors var catergoryPrefBranch = prefService.getBranch(""); var pbi = catergoryPrefBranch.QueryInterface( - Components.interfaces.nsIPrefBranchInternal); + Components.interfaces.nsIPrefBranch2); pbi.addObserver("calendar.category.color.", categoryPrefObserver, false); categoryPrefObserver.mCalendarStyleSheet = calStyleSheet; categoryPrefObserver.observe(null, null, ""); @@ -300,7 +300,7 @@ function calendarFinish() finishCalendarToDoUnifinder(); var pbi = prefService.getBranch(""); - pbi = pbi.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + pbi = pbi.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver("calendar.category.color.", categoryPrefObserver); gCalendarWindow.close(); diff --git a/mozilla/calendar/resources/content/pref/rootCalendarPref.js b/mozilla/calendar/resources/content/pref/rootCalendarPref.js index 7e63a48fa6b..52a5dd3e78f 100644 --- a/mozilla/calendar/resources/content/pref/rootCalendarPref.js +++ b/mozilla/calendar/resources/content/pref/rootCalendarPref.js @@ -40,7 +40,7 @@ function calendarPrefObserver( CalendarPreferences ) { this.CalendarPreferences = CalendarPreferences; try { - var pbi = rootPrefNode.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = rootPrefNode.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver("calendar.", this, false); window.addEventListener("unload", this, false); } catch(ex) { @@ -108,7 +108,7 @@ calendarPrefObserver.prototype = handleEvent: function handleEvent(event) { - var pbi = rootPrefNode.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = rootPrefNode.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(this.domain, this); } } diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index 686b38d0971..f047bbb8a71 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -74,7 +74,7 @@ #include "nsIWindowWatcher.h" #include "nsIConsoleService.h" #include "nsISecurityCheckedComponent.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIJSRuntimeService.h" #include "nsIObserverService.h" #include "nsIContent.h" @@ -3327,7 +3327,7 @@ nsScriptSecurityManager::InitPrefs() NS_ENSURE_SUCCESS(rv, rv); rv = prefService->GetBranch(nsnull, getter_AddRefs(mPrefBranch)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr prefBranchInternal(do_QueryInterface(mPrefBranch, &rv)); + nsCOMPtr prefBranchInternal(do_QueryInterface(mPrefBranch, &rv)); NS_ENSURE_SUCCESS(rv, rv); mSecurityPref = do_QueryInterface(mPrefBranch, &rv); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index f576d39ca4e..573fa2497de 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -83,7 +83,7 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPresShell.h" #include "nsISimpleEnumerator.h" #include "nsIStyleSheet.h" @@ -404,7 +404,7 @@ nsChromeRegistry::Init() mSelectedLocale = NS_LITERAL_CSTRING("en-US"); mSelectedSkin = NS_LITERAL_CSTRING("classic/1.0"); - nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); if (!prefs) { NS_WARNING("Could not get pref service!"); } @@ -471,7 +471,7 @@ nsChromeRegistry::CheckForOSAccessibility() RefreshSkins(); } - nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefs) { prefs->RemoveObserver(SELECTED_SKIN_PREF, this); } @@ -1236,7 +1236,7 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const char *aTopi PR_FALSE, uiLocale); if (NS_SUCCEEDED(rv) && !uiLocale.IsEmpty()) { CopyUTF16toUTF8(uiLocale, mSelectedLocale); - nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefs (do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefs) { prefs->RemoveObserver(SELECTED_LOCALE_PREF, this); } diff --git a/mozilla/content/events/src/nsEventStateManager.cpp b/mozilla/content/events/src/nsEventStateManager.cpp index c3ede940391..4888e9f57d5 100644 --- a/mozilla/content/events/src/nsEventStateManager.cpp +++ b/mozilla/content/events/src/nsEventStateManager.cpp @@ -82,7 +82,7 @@ #include "nsIDocShellTreeNode.h" #include "nsIWebNavigation.h" #include "nsIContentViewer.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIServiceManager.h" #include "nsIScriptSecurityManager.h" @@ -214,7 +214,7 @@ nsEventStateManager::Init() observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_QueryInterface(nsContentUtils::GetPrefBranch()); if (prefBranch) { @@ -304,7 +304,7 @@ nsEventStateManager::~nsEventStateManager() nsresult nsEventStateManager::Shutdown() { - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_QueryInterface(nsContentUtils::GetPrefBranch()); if (prefBranch) { diff --git a/mozilla/editor/ui/composer/content/editor.js b/mozilla/editor/ui/composer/content/editor.js index b73f2a975ca..d17c8ccb314 100644 --- a/mozilla/editor/ui/composer/content/editor.js +++ b/mozilla/editor/ui/composer/content/editor.js @@ -140,7 +140,7 @@ nsPrefListener.prototype = { this.domain = prefName; try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver(this.domain, this, false); } catch(ex) { dump("Failed to observe prefs: " + ex + "\n"); @@ -149,7 +149,7 @@ nsPrefListener.prototype = shutdown: function() { try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(this.domain, this); } catch(ex) { dump("Failed to remove pref observers: " + ex + "\n"); diff --git a/mozilla/embedding/browser/activex/src/plugin/PrefObserver.cpp b/mozilla/embedding/browser/activex/src/plugin/PrefObserver.cpp index 7ec3b5dfd54..a883372943d 100644 --- a/mozilla/embedding/browser/activex/src/plugin/PrefObserver.cpp +++ b/mozilla/embedding/browser/activex/src/plugin/PrefObserver.cpp @@ -43,7 +43,7 @@ #include "nsServiceManagerUtils.h" #include "nsISupportsUtils.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsWeakReference.h" #include "nsIObserver.h" #include "nsCRT.h" @@ -75,7 +75,7 @@ protected: void Sync(nsIPrefBranch *aPrefBranch); PRUint32 mHostingFlags; - nsCOMPtr mPrefBranch; + nsCOMPtr mPrefBranch; public: NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER diff --git a/mozilla/embedding/browser/activex/src/plugin/nsAxSecurityPolicy.js b/mozilla/embedding/browser/activex/src/plugin/nsAxSecurityPolicy.js index 12a1fe4043b..3bfe3a8d583 100644 --- a/mozilla/embedding/browser/activex/src/plugin/nsAxSecurityPolicy.js +++ b/mozilla/embedding/browser/activex/src/plugin/nsAxSecurityPolicy.js @@ -99,7 +99,7 @@ function addPrefListener(observer, prefStr) .getService(Components.interfaces.nsIPrefService); gPref = prefService.getBranch(null); } - var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver(prefStr, observer, false); } catch(ex) { dump("Failed to observe prefs: " + ex + "\n"); diff --git a/mozilla/extensions/cookie/nsCookiePermission.cpp b/mozilla/extensions/cookie/nsCookiePermission.cpp index 26e70c7a655..52cc3b4c17b 100644 --- a/mozilla/extensions/cookie/nsCookiePermission.cpp +++ b/mozilla/extensions/cookie/nsCookiePermission.cpp @@ -46,7 +46,7 @@ #include "nsIURI.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIDocShell.h" #include "nsIDocShellTreeItem.h" #include "nsIInterfaceRequestor.h" @@ -120,7 +120,7 @@ nsCookiePermission::Init() if (NS_FAILED(rv)) return rv; // failure to access the pref service is non-fatal... - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(kCookiesLifetimePolicy, this, PR_FALSE); diff --git a/mozilla/extensions/cookie/nsImgManager.cpp b/mozilla/extensions/cookie/nsImgManager.cpp index 6a01450e9dc..58da237bddb 100644 --- a/mozilla/extensions/cookie/nsImgManager.cpp +++ b/mozilla/extensions/cookie/nsImgManager.cpp @@ -46,7 +46,7 @@ #include "nsIDocShellTreeItem.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIDocShell.h" #include "nsString.h" #include "nsContentPolicyUtils.h" @@ -91,7 +91,7 @@ nsresult nsImgManager::Init() // other things, like mailnews blocking mPermissionManager = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID); - nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(kImageBehaviorPrefName, this, PR_TRUE); diff --git a/mozilla/extensions/cookie/nsPopupWindowManager.cpp b/mozilla/extensions/cookie/nsPopupWindowManager.cpp index f500073c897..f91a167a85f 100644 --- a/mozilla/extensions/cookie/nsPopupWindowManager.cpp +++ b/mozilla/extensions/cookie/nsPopupWindowManager.cpp @@ -41,7 +41,7 @@ #include "nsIServiceManager.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" /** * The Popup Window Manager maintains popup window permissions by website. @@ -73,7 +73,7 @@ nsPopupWindowManager::Init() nsresult rv; mPermissionManager = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID); - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { PRBool permission; diff --git a/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp b/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp index a0dec2fb298..ae4d802e4da 100644 --- a/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp +++ b/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp @@ -45,7 +45,7 @@ extern "C" { #include "nsIGenericFactory.h" #include "nsIInterfaceRequestorUtils.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIObserver.h" #include "nsEventQueueUtils.h" #include "nsProxyRelease.h" @@ -817,7 +817,7 @@ nsGnomeVFSProtocolHandler::Init() } } - nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefs) { InitSupportedProtocolsPref(prefs); diff --git a/mozilla/extensions/p3p/src/nsP3PService.cpp b/mozilla/extensions/p3p/src/nsP3PService.cpp index 773bf80bdde..de2bcb8aea5 100644 --- a/mozilla/extensions/p3p/src/nsP3PService.cpp +++ b/mozilla/extensions/p3p/src/nsP3PService.cpp @@ -42,7 +42,7 @@ #include "nsIURI.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsCRT.h" // pref string constants @@ -58,7 +58,7 @@ NS_IMPL_ISUPPORTS2(nsP3PService, nsICookieConsent, nsIObserver) nsP3PService::nsP3PService() { // we can live without a prefservice, so errors here aren't fatal - nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(kCookiesP3PStringPref, this, PR_FALSE); } diff --git a/mozilla/extensions/permissions/nsContentBlocker.h b/mozilla/extensions/permissions/nsContentBlocker.h index 98f49c9ae5b..5526bc939f5 100644 --- a/mozilla/extensions/permissions/nsContentBlocker.h +++ b/mozilla/extensions/permissions/nsContentBlocker.h @@ -40,7 +40,7 @@ #include "nsIObserver.h" #include "nsWeakReference.h" #include "nsIPermissionManager.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" class nsIPrefBranch; @@ -74,7 +74,7 @@ private: PRBool *aFromPrefs); nsCOMPtr mPermissionManager; - nsCOMPtr mPrefBranchInternal; + nsCOMPtr mPrefBranchInternal; PRUint8 mBehaviorPref[NUMBER_OF_TYPES]; }; diff --git a/mozilla/extensions/permissions/nsMailnewsContentBlocker.cpp b/mozilla/extensions/permissions/nsMailnewsContentBlocker.cpp index 3961b4588a5..5f62352730e 100644 --- a/mozilla/extensions/permissions/nsMailnewsContentBlocker.cpp +++ b/mozilla/extensions/permissions/nsMailnewsContentBlocker.cpp @@ -42,7 +42,7 @@ #include "nsIDocShellTreeItem.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIDocShell.h" #include "nsContentPolicyUtils.h" #include "nsString.h" @@ -71,7 +71,7 @@ nsMailnewsContentBlocker::nsMailnewsContentBlocker() nsresult nsMailnewsContentBlocker::Init() { - nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(kBlockRemotePrefName, this, PR_TRUE); diff --git a/mozilla/extensions/spellcheck/src/mozPersonalDictionary.cpp b/mozilla/extensions/spellcheck/src/mozPersonalDictionary.cpp index b3ad36fda7c..28d53cb7120 100644 --- a/mozilla/extensions/spellcheck/src/mozPersonalDictionary.cpp +++ b/mozilla/extensions/spellcheck/src/mozPersonalDictionary.cpp @@ -45,7 +45,7 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIWeakReference.h" #include "nsCRT.h" #include "nsNetUtil.h" diff --git a/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp b/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp index 15fbe15474c..3ae62f6c46c 100644 --- a/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp +++ b/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp @@ -58,7 +58,7 @@ #include "nsIChromeEventHandler.h" #include "nsIDOMNSEvent.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefService.h" #include "nsString.h" #include "nsCRT.h" @@ -171,7 +171,7 @@ nsTypeAheadFind::~nsTypeAheadFind() RemoveDocListeners(); mTimer = nsnull; - nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefInternal) { prefInternal->RemoveObserver("accessibility.typeaheadfind", this); prefInternal->RemoveObserver("accessibility.browsewithcaret", this); @@ -185,7 +185,7 @@ nsTypeAheadFind::Init() NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); mSearchRange = do_CreateInstance(kRangeCID); mStartPointRange = do_CreateInstance(kRangeCID); mEndPointRange = do_CreateInstance(kRangeCID); diff --git a/mozilla/extensions/webservices/security/src/nsWebScriptsAccess.cpp b/mozilla/extensions/webservices/security/src/nsWebScriptsAccess.cpp index 5dc98296d7e..d03c627111d 100755 --- a/mozilla/extensions/webservices/security/src/nsWebScriptsAccess.cpp +++ b/mozilla/extensions/webservices/security/src/nsWebScriptsAccess.cpp @@ -59,7 +59,7 @@ #include "nsISOAPBlock.h" #include "nsIVariant.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIJSContextStack.h" #define WSA_GRANT_ACCESS_TO_ALL (1 << 0) diff --git a/mozilla/gfx/src/qt/nsDeviceContextQt.cpp b/mozilla/gfx/src/qt/nsDeviceContextQt.cpp index cb66b51523c..19756ce4beb 100644 --- a/mozilla/gfx/src/qt/nsDeviceContextQt.cpp +++ b/mozilla/gfx/src/qt/nsDeviceContextQt.cpp @@ -45,7 +45,7 @@ #include "nspr.h" #include "nsIPrefBranch.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIServiceManager.h" #include "nsCRT.h" #include "nsDeviceContextQt.h" @@ -96,7 +96,7 @@ nsDeviceContextQt::nsDeviceContextQt() nsDeviceContextQt::~nsDeviceContextQt() { - nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); if (pbi) { pbi->RemoveObserver("browser.display.screen_resolution", this); } @@ -147,7 +147,7 @@ NS_IMETHODIMP nsDeviceContextQt::Init(nsNativeWidget aNativeWidget) if (NS_FAILED(res)) { prefVal = -1; } - nsCOMPtr pbi(do_QueryInterface(prefBranch)); + nsCOMPtr pbi(do_QueryInterface(prefBranch)); pbi->AddObserver("browser.display.screen_resolution", this, PR_FALSE); } diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 7dec800cc0e..ffb6aad058f 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -94,7 +94,7 @@ #include "nsIDOMWindow.h" #include "nsIDOMDocument.h" #include "nsCSSFrameConstructor.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefService.h" #include "gfxIImageFrame.h" #include "nsIDOMRange.h" @@ -2017,7 +2017,7 @@ nsImageFrame::IconLoad::IconLoad(imgIDecoderObserver *aObserver) : mLoadObserver(aObserver), mIconsLoaded(0) { - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_QueryInterface(nsContentUtils::GetPrefBranch()); // register observers diff --git a/mozilla/mail/base/content/ABSearchDialog.js b/mozilla/mail/base/content/ABSearchDialog.js index ec7a3818953..ecbb650bfc9 100644 --- a/mozilla/mail/base/content/ABSearchDialog.js +++ b/mozilla/mail/base/content/ABSearchDialog.js @@ -83,7 +83,7 @@ function searchOnLoad() // initialize a flag for phonetic name search var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); gSearchPhoneticName = prefBranch.getComplexValue("mail.addr_book.show_phonetic_fields", Components.interfaces.nsIPrefLocalizedString).data; diff --git a/mozilla/mail/base/content/msgMail3PaneWindow.js b/mozilla/mail/base/content/msgMail3PaneWindow.js index ea73438c2ac..02520de9185 100644 --- a/mozilla/mail/base/content/msgMail3PaneWindow.js +++ b/mozilla/mail/base/content/msgMail3PaneWindow.js @@ -785,7 +785,7 @@ function OnLoadMessenger() /* Functions related to startup */ function delayedOnLoadMessenger() { - pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pref.addObserver("mail.pane_config.dynamic", MailPrefObserver, false); pref.addObserver("mail.showFolderPaneColumns", MailPrefObserver, false); @@ -844,7 +844,7 @@ function OnUnloadMessenger() { OnLeavingFolder(gMsgFolderSelected); // mark all read in current folder accountManager.removeIncomingServerListener(gThreePaneIncomingServerListener); - pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pref.removeObserver("mail.pane_config.dynamic", MailPrefObserver); pref.removeObserver("mail.showFolderPaneColumns", MailPrefObserver); diff --git a/mozilla/mail/base/content/nsContextMenu.js b/mozilla/mail/base/content/nsContextMenu.js index 53700f86221..9423fc7d0e2 100644 --- a/mozilla/mail/base/content/nsContextMenu.js +++ b/mozilla/mail/base/content/nsContextMenu.js @@ -812,7 +812,7 @@ function nsDefaultEngine() var pb = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPrefBranch); var pbi = pb.QueryInterface( - Components.interfaces.nsIPrefBranchInternal); + Components.interfaces.nsIPrefBranch2); pbi.addObserver(this.domain, this, false); // reuse code by explicitly invoking initial |observe| call diff --git a/mozilla/mail/components/addrbook/content/addressbook.js b/mozilla/mail/components/addrbook/content/addressbook.js index fd35bd5233d..fcad5e7dcb0 100644 --- a/mozilla/mail/components/addrbook/content/addressbook.js +++ b/mozilla/mail/components/addrbook/content/addressbook.js @@ -119,7 +119,7 @@ function AddPrefObservers() { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); prefBranch.addObserver(kPrefMailAddrBookLastNameFirst, gMailAddrBookLastNameFirstObserver, false); } @@ -127,7 +127,7 @@ function RemovePrefObservers() { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); prefBranch.removeObserver(kPrefMailAddrBookLastNameFirst, gMailAddrBookLastNameFirstObserver); } diff --git a/mozilla/mail/components/compose/content/MsgComposeCommands.js b/mozilla/mail/components/compose/content/MsgComposeCommands.js index de01218a9e4..0cd29e49f7c 100644 --- a/mozilla/mail/components/compose/content/MsgComposeCommands.js +++ b/mozilla/mail/components/compose/content/MsgComposeCommands.js @@ -1468,7 +1468,7 @@ function ComposeLoad() var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); sPrefs = prefService.getBranch(null); - sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2); } catch (ex) { dump("failed to preferences services\n"); diff --git a/mozilla/mailnews/addrbook/resources/content/addressbook.js b/mozilla/mailnews/addrbook/resources/content/addressbook.js index 06db3ab1398..37b64c53a78 100644 --- a/mozilla/mailnews/addrbook/resources/content/addressbook.js +++ b/mozilla/mailnews/addrbook/resources/content/addressbook.js @@ -121,7 +121,7 @@ function AddPrefObservers() { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); prefBranch.addObserver(kPrefMailAddrBookLastNameFirst, gMailAddrBookLastNameFirstObserver, false); } @@ -129,7 +129,7 @@ function RemovePrefObservers() { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); prefBranch.removeObserver(kPrefMailAddrBookLastNameFirst, gMailAddrBookLastNameFirstObserver); } diff --git a/mozilla/mailnews/addrbook/src/nsAbAddressCollecter.cpp b/mozilla/mailnews/addrbook/src/nsAbAddressCollecter.cpp index f4e7e3a4bda..c7527ba6080 100644 --- a/mozilla/mailnews/addrbook/src/nsAbAddressCollecter.cpp +++ b/mozilla/mailnews/addrbook/src/nsAbAddressCollecter.cpp @@ -45,7 +45,7 @@ #include "nsAbBaseCID.h" #include "nsAbAddressCollecter.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIAddrBookSession.h" #include "nsIMsgHeaderParser.h" #include "nsIRDFService.h" @@ -72,7 +72,7 @@ nsAbAddressCollecter::~nsAbAddressCollecter() } nsresult rv; - nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); if(NS_SUCCEEDED(rv)) pPrefBranchInt->RemoveObserver(PREF_MAIL_COLLECT_ADDRESSBOOK, this); } @@ -304,7 +304,7 @@ nsresult nsAbAddressCollecter::SplitFullName(const char *fullName, char **firstN NS_IMETHODIMP nsAbAddressCollecter::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { - nsCOMPtr pPrefBranchInt = do_QueryInterface(aSubject); + nsCOMPtr pPrefBranchInt = do_QueryInterface(aSubject); NS_ASSERTION(pPrefBranchInt, "failed to get prefs"); nsresult rv; @@ -318,7 +318,7 @@ NS_IMETHODIMP nsAbAddressCollecter::Observe(nsISupports *aSubject, const char *a nsresult nsAbAddressCollecter::Init(void) { nsresult rv; - nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); rv = pPrefBranchInt->AddObserver(PREF_MAIL_COLLECT_ADDRESSBOOK, this, PR_FALSE); diff --git a/mozilla/mailnews/addrbook/src/nsAbView.cpp b/mozilla/mailnews/addrbook/src/nsAbView.cpp index 270e16aeaa4..f22ee90d718 100644 --- a/mozilla/mailnews/addrbook/src/nsAbView.cpp +++ b/mozilla/mailnews/addrbook/src/nsAbView.cpp @@ -53,7 +53,7 @@ #include "nsITreeColumns.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIStringBundle.h" #include "nsIPrefLocalizedString.h" @@ -156,7 +156,7 @@ NS_IMETHODIMP nsAbView::GetURI(char **aURI) nsresult nsAbView::SetGeneratedNameFormatFromPrefs() { nsresult rv; - nsCOMPtr prefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr prefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); rv = prefBranchInt->GetIntPref(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, &mGeneratedNameFormat); @@ -168,7 +168,7 @@ nsresult nsAbView::AddPrefObservers() { nsresult rv; - nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); rv = pbi->AddObserver(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, this, PR_FALSE); @@ -179,7 +179,7 @@ nsresult nsAbView::RemovePrefObservers() { nsresult rv; - nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); rv = pbi->RemoveObserver(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, this); @@ -1169,7 +1169,7 @@ NS_IMETHODIMP nsAbView::SwapFirstNameLastName() PRBool displayNameAutoGeneration; PRBool displayNameLastnamefirst = PR_FALSE; - nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pPrefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); rv = pPrefBranchInt->GetBoolPref(PREF_MAIL_ADDR_BOOK_DISPLAYNAME_AUTOGENERATION, &displayNameAutoGeneration); diff --git a/mozilla/mailnews/base/resources/content/mailWindow.js b/mozilla/mailnews/base/resources/content/mailWindow.js index 8f3116622e3..fbb3d6470ea 100644 --- a/mozilla/mailnews/base/resources/content/mailWindow.js +++ b/mozilla/mailnews/base/resources/content/mailWindow.js @@ -698,7 +698,7 @@ function ShowHideToolBarButtons() function AddToolBarPrefListener() { try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver(gMailToolBarPrefListener.domain, gMailToolBarPrefListener, false); } catch(ex) { dump("Failed to observe prefs: " + ex + "\n"); @@ -708,7 +708,7 @@ function AddToolBarPrefListener() function RemoveToolBarPrefListener() { try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(gMailToolBarPrefListener.domain, gMailToolBarPrefListener); } catch(ex) { dump("Failed to remove pref observer: " + ex + "\n"); diff --git a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js index b9d8d35a363..e92be88cfc1 100644 --- a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js +++ b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js @@ -693,7 +693,7 @@ function OnLoadMessenger() { AddMailOfflineObserver(); CreateMailWindowGlobals(); - pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pref.addObserver("mail.pane_config.dynamic", MailPaneConfigObserver, false); UpdateMailPaneConfig(); Create3PaneGlobals(); diff --git a/mozilla/mailnews/base/search/resources/content/ABSearchDialog.js b/mozilla/mailnews/base/search/resources/content/ABSearchDialog.js index 211ac0b9d23..94a3ba1ad7b 100644 --- a/mozilla/mailnews/base/search/resources/content/ABSearchDialog.js +++ b/mozilla/mailnews/base/search/resources/content/ABSearchDialog.js @@ -86,7 +86,7 @@ function searchOnLoad() // initialize a flag for phonetic name search var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); - var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var prefBranch = prefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); gSearchPhoneticName = prefBranch.getComplexValue("mail.addr_book.show_phonetic_fields", Components.interfaces.nsIPrefLocalizedString).data; diff --git a/mozilla/mailnews/base/src/nsMessenger.cpp b/mozilla/mailnews/base/src/nsMessenger.cpp index 608e4cd478a..32c131d8e5e 100644 --- a/mozilla/mailnews/base/src/nsMessenger.cpp +++ b/mozilla/mailnews/base/src/nsMessenger.cpp @@ -141,7 +141,7 @@ #include "nsIStringBundle.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsCExternalHandlerService.h" #include "nsIExternalProtocolService.h" #include "nsIMIMEService.h" @@ -340,7 +340,7 @@ NS_IMPL_GETSET(nsMessenger, SendingUnsentMsgs, PRBool, mSendingUnsentMsgs) NS_IMETHODIMP nsMessenger::SetWindow(nsIDOMWindowInternal *aWin, nsIMsgWindow *aMsgWindow) { - nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); if(!aWin) { diff --git a/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp index 5228a8f6b41..78120a677d5 100644 --- a/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp +++ b/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp @@ -61,7 +61,7 @@ #include "nsXPCOM.h" #include "nsISupportsPrimitives.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" // turn this on to see useful output #undef DEBUG_amds @@ -209,7 +209,7 @@ nsMsgAccountManagerDataSource::nsMsgAccountManagerDataSource() kDefaultServerAtom = NS_NewAtom("DefaultServer"); } - nsCOMPtr prefBranchInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefBranchInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefBranchInternal) prefBranchInternal->AddObserver(PREF_SHOW_FAKE_ACCOUNT, this, PR_FALSE); } @@ -1408,7 +1408,7 @@ nsMsgAccountManagerDataSource::Observe(nsISupports *aSubject, const char *aTopic } } else if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { - nsCOMPtr prefBranchInternal = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranchInternal = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranchInternal) prefBranchInternal->RemoveObserver(PREF_SHOW_FAKE_ACCOUNT, this); } diff --git a/mozilla/mailnews/base/src/nsMsgContentPolicy.cpp b/mozilla/mailnews/base/src/nsMsgContentPolicy.cpp index e281bb09944..c3c0100fe0e 100644 --- a/mozilla/mailnews/base/src/nsMsgContentPolicy.cpp +++ b/mozilla/mailnews/base/src/nsMsgContentPolicy.cpp @@ -39,7 +39,7 @@ #include "nsMsgContentPolicy.h" #include "nsIServiceManager.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIURI.h" #include "nsCOMPtr.h" #include "nsCRT.h" @@ -96,7 +96,7 @@ nsMsgContentPolicy::~nsMsgContentPolicy() { // hey, we are going away...clean up after ourself....unregister our observer nsresult rv; - nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); + nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { prefInternal->RemoveObserver(kBlockRemoteImages, this); @@ -111,7 +111,7 @@ nsresult nsMsgContentPolicy::Init() nsresult rv; // register ourself as an observer on the mail preference to block remote images - nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); + nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); prefInternal->AddObserver(kBlockRemoteImages, this, PR_TRUE); @@ -298,7 +298,7 @@ NS_IMETHODIMP nsMsgContentPolicy::Observe(nsISupports *aSubject, const char *aTo nsresult rv; - nsCOMPtr prefBranchInt = do_QueryInterface(aSubject, &rv); + nsCOMPtr prefBranchInt = do_QueryInterface(aSubject, &rv); NS_ENSURE_SUCCESS(rv, rv); if (pref.Equals(kBlockRemoteImages)) diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index 2b075e99d1a..cb15a5f6968 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -58,7 +58,7 @@ #include "nsMsgMimeCID.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsIMsgSearchSession.h" #include "nsIMsgCopyService.h" @@ -290,7 +290,7 @@ nsresult nsMsgDBView::AddLabelPrefObservers() nsresult rv; nsCString prefString; - nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); InitLabelPrefs(); @@ -315,7 +315,7 @@ nsresult nsMsgDBView::RemoveLabelPrefObservers() nsresult rv; nsCString prefString; - nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + nsCOMPtr pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv,rv); for(PRInt32 i = 0; i < PREF_LABELS_MAX; i++) diff --git a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js index bc1e3022bfd..96939cd5f07 100644 --- a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js @@ -1422,7 +1422,7 @@ function ComposeLoad() var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); sPrefs = prefService.getBranch(null); - sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + sPrefBranchInternal = sPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2); } catch (ex) { dump("failed to preferences services\n"); diff --git a/mozilla/mailnews/compose/src/nsMsgComposeService.cpp b/mozilla/mailnews/compose/src/nsMsgComposeService.cpp index 6a1f95fac9c..b0a963a0857 100644 --- a/mozilla/mailnews/compose/src/nsMsgComposeService.cpp +++ b/mozilla/mailnews/compose/src/nsMsgComposeService.cpp @@ -72,7 +72,7 @@ #include "nsIBaseWindow.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsMsgBaseCID.h" #include "nsIMsgAccountManager.h" @@ -191,7 +191,7 @@ nsresult nsMsgComposeService::Init() } // Register some pref observer - nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr pbi = do_GetService(NS_PREFSERVICE_CONTRACTID); if (pbi) rv = pbi->AddObserver(PREF_MAIL_COMPOSE_MAXRECYCLEDWINDOWS, this, PR_TRUE); diff --git a/mozilla/mailnews/db/msgdb/src/nsDBFolderInfo.cpp b/mozilla/mailnews/db/msgdb/src/nsDBFolderInfo.cpp index 2b8b1cf60ca..a1f4d171a3a 100644 --- a/mozilla/mailnews/db/msgdb/src/nsDBFolderInfo.cpp +++ b/mozilla/mailnews/db/msgdb/src/nsDBFolderInfo.cpp @@ -42,7 +42,7 @@ #include "nsMsgFolderFlags.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsIObserver.h" #include "nsIObserverService.h" @@ -136,7 +136,7 @@ NS_IMETHODIMP nsFolderCharsetObserver::Observe(nsISupports *aSubject, const char } else if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { - nsCOMPtr pbi = do_QueryInterface(prefBranch); + nsCOMPtr pbi = do_QueryInterface(prefBranch); if (pbi) { rv = pbi->RemoveObserver(kMAILNEWS_VIEW_DEFAULT_CHARSET, this); @@ -230,7 +230,7 @@ nsDBFolderInfo::nsDBFolderInfo(nsMsgDatabase *mdb) if (gFolderCharsetObserver) { NS_ADDREF(gFolderCharsetObserver); - nsCOMPtr pbi = do_QueryInterface(prefBranch); + nsCOMPtr pbi = do_QueryInterface(prefBranch); if (pbi) { rv = pbi->AddObserver(kMAILNEWS_VIEW_DEFAULT_CHARSET, gFolderCharsetObserver, PR_FALSE); rv = pbi->AddObserver(kMAILNEWS_DEFAULT_CHARSET_OVERRIDE, gFolderCharsetObserver, PR_FALSE); diff --git a/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js b/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js index 92825b9ef23..747d6f14ef2 100644 --- a/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js +++ b/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js @@ -130,7 +130,7 @@ const gLabelPrefListener = { function AddLabelPrefListener() { try { - gPrefBranch.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + gPrefBranch.QueryInterface(Components.interfaces.nsIPrefBranch2); gPrefBranch.addObserver(kLabelPrefs, gLabelPrefListener, false); } catch(ex) { dump("Failed to observe prefs: " + ex + "\n"); @@ -140,7 +140,7 @@ function AddLabelPrefListener() function RemoveLabelPrefListener() { try { - gPrefBranch.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + gPrefBranch.QueryInterface(Components.interfaces.nsIPrefBranch2); gPrefBranch.removeObserver(kLabelPrefs, gLabelPrefListener); } catch(ex) { dump("Failed to remove pref observer: " + ex + "\n"); diff --git a/mozilla/modules/oji/src/nsJVMManager.cpp b/mozilla/modules/oji/src/nsJVMManager.cpp index f112fc7e351..c6e28bc196c 100644 --- a/mozilla/modules/oji/src/nsJVMManager.cpp +++ b/mozilla/modules/oji/src/nsJVMManager.cpp @@ -80,7 +80,7 @@ #include "nsIObserver.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefService.h" #include "lcglue.h" @@ -373,7 +373,7 @@ nsJVMManager::nsJVMManager(nsISupports* outer) { NS_INIT_AGGREGATED(outer); - nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (branch) branch->AddObserver("security.enable_java", this, PR_FALSE); } diff --git a/mozilla/netwerk/base/src/nsIOService.cpp b/mozilla/netwerk/base/src/nsIOService.cpp index 6add96c600b..fcf3334825b 100644 --- a/mozilla/netwerk/base/src/nsIOService.cpp +++ b/mozilla/netwerk/base/src/nsIOService.cpp @@ -53,7 +53,7 @@ #include "netCore.h" #include "nsIObserverService.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsICategoryManager.h" #include "nsXPCOM.h" @@ -212,7 +212,7 @@ nsIOService::Init() mRestrictedPortList.AppendElement(NS_REINTERPRET_CAST(void *, gBadPortList[i])); // Further modifications to the port list come from prefs - nsCOMPtr prefBranch; + nsCOMPtr prefBranch; GetPrefBranch(getter_AddRefs(prefBranch)); if (prefBranch) { prefBranch->AddObserver(PORT_PREF_PREFIX, this, PR_TRUE); @@ -310,7 +310,7 @@ nsIOService::GetProtocolHandler(const char* scheme, nsIProtocolHandler* *result) PRBool externalProtocol = PR_FALSE; PRBool listedProtocol = PR_TRUE; - nsCOMPtr prefBranch; + nsCOMPtr prefBranch; GetPrefBranch(getter_AddRefs(prefBranch)); if (prefBranch) { nsCAutoString externalProtocolPref("network.protocol-handler.external."); @@ -658,7 +658,7 @@ nsIOService::ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool r } void -nsIOService::GetPrefBranch(nsIPrefBranchInternal **result) +nsIOService::GetPrefBranch(nsIPrefBranch2 **result) { *result = nsnull; CallGetService(NS_PREFSERVICE_CONTRACTID, result); diff --git a/mozilla/netwerk/base/src/nsIOService.h b/mozilla/netwerk/base/src/nsIOService.h index bdc771245d1..5c33475b662 100644 --- a/mozilla/netwerk/base/src/nsIOService.h +++ b/mozilla/netwerk/base/src/nsIOService.h @@ -67,7 +67,7 @@ static const char *gScheme[] = {"chrome", "file", "http", "jar", "resource"}; class nsIPrefBranch; -class nsIPrefBranchInternal; +class nsIPrefBranch2; class nsIOService : public nsIIOService , public nsIObserver @@ -96,7 +96,7 @@ protected: // Prefs wrangling NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull); - NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranchInternal **); + NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **); NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove); protected: diff --git a/mozilla/netwerk/base/src/nsProtocolProxyService.cpp b/mozilla/netwerk/base/src/nsProtocolProxyService.cpp index df8dd0d000d..6e5cb92bf6f 100644 --- a/mozilla/netwerk/base/src/nsProtocolProxyService.cpp +++ b/mozilla/netwerk/base/src/nsProtocolProxyService.cpp @@ -47,7 +47,7 @@ #include "nsIProtocolHandler.h" #include "nsIDNSService.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsReadableUtils.h" #include "nsString.h" #include "nsNetUtil.h" @@ -249,7 +249,7 @@ nsProtocolProxyService::Init() return NS_ERROR_OUT_OF_MEMORY; // failure to access prefs is non-fatal - nsCOMPtr prefBranch = + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { // monitor proxy prefs diff --git a/mozilla/netwerk/base/src/nsStandardURL.cpp b/mozilla/netwerk/base/src/nsStandardURL.cpp index 5c5e40a7942..cbfbf980339 100644 --- a/mozilla/netwerk/base/src/nsStandardURL.cpp +++ b/mozilla/netwerk/base/src/nsStandardURL.cpp @@ -49,7 +49,7 @@ #include "nsICharsetConverterManager.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIIDNService.h" #include "nsNetUtil.h" #include "prlog.h" @@ -291,7 +291,7 @@ nsStandardURL::~nsStandardURL() void nsStandardURL::InitGlobalObjects() { - nsCOMPtr prefBranch( do_GetService(NS_PREFSERVICE_CONTRACTID) ); + nsCOMPtr prefBranch( do_GetService(NS_PREFSERVICE_CONTRACTID) ); if (prefBranch) { nsCOMPtr obs( new nsPrefObserver() ); prefBranch->AddObserver(NS_NET_PREF_ESCAPEUTF8, obs.get(), PR_FALSE); diff --git a/mozilla/netwerk/cache/src/nsCacheService.cpp b/mozilla/netwerk/cache/src/nsCacheService.cpp index 15b2a45a352..cb887150979 100644 --- a/mozilla/netwerk/cache/src/nsCacheService.cpp +++ b/mozilla/netwerk/cache/src/nsCacheService.cpp @@ -61,7 +61,7 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsILocalFile.h" #include "nsDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h" @@ -155,7 +155,7 @@ nsCacheProfilePrefObserver::Install() // install preferences observer - nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (!branch) return NS_ERROR_FAILURE; char * prefList[] = { @@ -213,7 +213,7 @@ nsCacheProfilePrefObserver::Remove() // remove Pref Service observers - nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID); // remove Disk cache pref observers rv = prefInternal->RemoveObserver(DISK_CACHE_ENABLE_PREF, this); diff --git a/mozilla/netwerk/cookie/src/nsCookieService.cpp b/mozilla/netwerk/cookie/src/nsCookieService.cpp index 609417704dd..c6024e554d7 100644 --- a/mozilla/netwerk/cookie/src/nsCookieService.cpp +++ b/mozilla/netwerk/cookie/src/nsCookieService.cpp @@ -43,7 +43,7 @@ #include "nsIIOService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefService.h" #include "nsICookieConsent.h" #include "nsICookiePermission.h" @@ -396,7 +396,7 @@ nsCookieService::Init() } // init our pref and observer - nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(kPrefCookiesPermissions, this, PR_TRUE); prefBranch->AddObserver(kPrefMaxNumberOfCookies, this, PR_TRUE); diff --git a/mozilla/netwerk/dns/src/nsDNSService2.cpp b/mozilla/netwerk/dns/src/nsDNSService2.cpp index 2cbc9f6a775..4d976f1c116 100644 --- a/mozilla/netwerk/dns/src/nsDNSService2.cpp +++ b/mozilla/netwerk/dns/src/nsDNSService2.cpp @@ -39,7 +39,7 @@ #include "nsIProxyObjectManager.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIServiceManager.h" #include "nsReadableUtils.h" #include "nsString.h" @@ -299,7 +299,7 @@ nsDNSService::Init() nsAdoptingCString ipv4OnlyDomains; // read prefs - nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefs) { PRInt32 val; if (NS_SUCCEEDED(prefs->GetIntPref(kPrefDnsCacheEntries, &val))) diff --git a/mozilla/netwerk/dns/src/nsIDNService.cpp b/mozilla/netwerk/dns/src/nsIDNService.cpp index 7c47e35ad87..04ffe23a9ba 100644 --- a/mozilla/netwerk/dns/src/nsIDNService.cpp +++ b/mozilla/netwerk/dns/src/nsIDNService.cpp @@ -44,7 +44,7 @@ #include "nsIServiceManager.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIObserverService.h" #include "punycode.h" @@ -70,7 +70,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS3(nsIDNService, nsresult nsIDNService::Init() { - nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefInternal) { prefInternal->AddObserver(NS_NET_PREF_IDNTESTBED, this, PR_TRUE); prefInternal->AddObserver(NS_NET_PREF_IDNPREFIX, this, PR_TRUE); diff --git a/mozilla/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp b/mozilla/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp index eed5bdcbc77..50aa98df22f 100644 --- a/mozilla/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp +++ b/mozilla/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp @@ -61,7 +61,7 @@ #include "prlog.h" #include "nsNetUtil.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIObserverService.h" #include "nsEscape.h" @@ -127,7 +127,7 @@ nsFtpProtocolHandler::Init() nsresult rv; if (mIdleTimeout == -1) { - nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); + nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; rv = branch->GetIntPref(IDLE_TIMEOUT_PREF, &mIdleTimeout); diff --git a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp index ed676700a77..6783a83edbe 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp @@ -60,7 +60,7 @@ #include "nsCategoryManagerUtils.h" #include "nsICacheService.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsISocketProviderService.h" #include "nsISocketProvider.h" @@ -209,7 +209,7 @@ nsHttpHandler::Init() InitUserAgentComponents(); // monitor some preference changes - nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefBranch) { prefBranch->AddObserver(HTTP_PREF_PREFIX, this, PR_TRUE); prefBranch->AddObserver(UA_PREF_PREFIX, this, PR_TRUE); diff --git a/mozilla/security/manager/ssl/src/nsNSSComponent.cpp b/mozilla/security/manager/ssl/src/nsNSSComponent.cpp index 48382d40ff0..80a0644393e 100644 --- a/mozilla/security/manager/ssl/src/nsNSSComponent.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSComponent.cpp @@ -62,7 +62,7 @@ #include "prlog.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIDateTimeFormat.h" #include "nsDateTimeFormatCID.h" #include "nsAutoLock.h" @@ -1167,7 +1167,7 @@ nsNSSComponent::InitializeNSS(PRBool showWarningBox) PK11_SetPasswordFunc(PK11PasswordPrompt); // Register an observer so we can inform NSS when these prefs change - nsCOMPtr pbi = do_QueryInterface(mPrefBranch); + nsCOMPtr pbi = do_QueryInterface(mPrefBranch); pbi->AddObserver("security.", this, PR_FALSE); PRBool enabled; @@ -1249,7 +1249,7 @@ nsNSSComponent::ShutdownNSS() PK11_SetPasswordFunc((PK11PasswordFunc)nsnull); if (mPrefBranch) { - nsCOMPtr pbi = do_QueryInterface(mPrefBranch); + nsCOMPtr pbi = do_QueryInterface(mPrefBranch); pbi->RemoveObserver("security.", this); } diff --git a/mozilla/toolkit/components/history/src/nsGlobalHistory.cpp b/mozilla/toolkit/components/history/src/nsGlobalHistory.cpp index b06954577a6..ded2b5d6fde 100644 --- a/mozilla/toolkit/components/history/src/nsGlobalHistory.cpp +++ b/mozilla/toolkit/components/history/src/nsGlobalHistory.cpp @@ -81,7 +81,7 @@ #include "nsIMdbFactoryFactory.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIObserverService.h" #include "nsITextToSubURI.h" @@ -2512,7 +2512,7 @@ nsGlobalHistory::Init() gPrefBranch->GetIntPref(PREF_BROWSER_HISTORY_EXPIRE_DAYS, &mExpireDays); gPrefBranch->GetBoolPref(PREF_AUTOCOMPLETE_ONLY_TYPED, &mAutocompleteOnlyTyped); - nsCOMPtr pbi = do_QueryInterface(gPrefBranch); + nsCOMPtr pbi = do_QueryInterface(gPrefBranch); if (pbi) { pbi->AddObserver(PREF_AUTOCOMPLETE_ONLY_TYPED, this, PR_FALSE); pbi->AddObserver(PREF_BROWSER_HISTORY_EXPIRE_DAYS, this, PR_FALSE); diff --git a/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp b/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp index 9d895d48600..f9867286c95 100644 --- a/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp +++ b/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp @@ -46,7 +46,7 @@ #include "nsIPrompt.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "prmem.h" #include "nsIStringBundle.h" #include "nsArray.h" @@ -239,7 +239,7 @@ nsPasswordManager::Init() mPrefBranch->GetBoolPref("rememberSignons", &sRememberPasswords); - nsCOMPtr branchInternal = do_QueryInterface(mPrefBranch); + nsCOMPtr branchInternal = do_QueryInterface(mPrefBranch); // Have the pref service hold a weak reference; the service manager // will be holding a strong reference. diff --git a/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp b/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp index 2cf4d9f0a70..ff1c24e1098 100644 --- a/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp +++ b/mozilla/toolkit/components/satchel/src/nsFormHistory.cpp @@ -57,7 +57,7 @@ #include "nsIDOMHTMLCollection.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsVoidArray.h" #include "nsCOMArray.h" @@ -149,7 +149,7 @@ nsFormHistory::FormHistoryEnabled() gFormHistory->mPrefBranch->GetBoolPref(PREF_FORMFILL_ENABLE, &gFormHistoryEnabled); - nsCOMPtr branchInternal = + nsCOMPtr branchInternal = do_QueryInterface(gFormHistory->mPrefBranch); branchInternal->AddObserver(PREF_FORMFILL_ENABLE, gFormHistory, PR_TRUE); diff --git a/mozilla/toolkit/components/typeaheadfind/content/findBar.js b/mozilla/toolkit/components/typeaheadfind/content/findBar.js index 526ad532bf5..748f2fd9791 100755 --- a/mozilla/toolkit/components/typeaheadfind/content/findBar.js +++ b/mozilla/toolkit/components/typeaheadfind/content/findBar.js @@ -88,7 +88,7 @@ function initFindBar() var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); - var pbi = prefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = prefService.QueryInterface(Components.interfaces.nsIPrefBranch2); gQuickFindTimeoutLength = prefService.getIntPref("accessibility.typeaheadfind.timeout"); gFlashFindBar = prefService.getIntPref("accessibility.typeaheadfind.flashBar"); @@ -104,7 +104,7 @@ function uninitFindBar() var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); - var pbi = prefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = prefService.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(gTypeAheadFind.useTAFPref, gTypeAheadFind); pbi.removeObserver(gTypeAheadFind.searchLinksPref, gTypeAheadFind); diff --git a/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp b/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp index 2d2822a8c7f..2a6c01dc114 100755 --- a/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp +++ b/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp @@ -56,7 +56,7 @@ #include "nsPIDOMWindow.h" #include "nsIDOMNSEvent.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefService.h" #include "nsString.h" #include "nsCRT.h" @@ -129,7 +129,7 @@ nsTypeAheadFind::~nsTypeAheadFind() { Cancel(); - nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefInternal) { prefInternal->RemoveObserver("accessibility.typeaheadfind", this); prefInternal->RemoveObserver("accessibility.browsewithcaret", this); @@ -139,7 +139,7 @@ nsTypeAheadFind::~nsTypeAheadFind() nsresult nsTypeAheadFind::Init(nsIDocShell* aDocShell) { - nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); mSearchRange = do_CreateInstance(kRangeCID); mStartPointRange = do_CreateInstance(kRangeCID); mEndPointRange = do_CreateInstance(kRangeCID); diff --git a/mozilla/toolkit/components/viewconfig/content/config.js b/mozilla/toolkit/components/viewconfig/content/config.js index 04784e022ca..ad2fc6b46a0 100644 --- a/mozilla/toolkit/components/viewconfig/content/config.js +++ b/mozilla/toolkit/components/viewconfig/content/config.js @@ -54,7 +54,7 @@ const nsAtomService_CONTRACTID = "@mozilla.org/atom-service;1"; const gPromptService = Components.classes[nsPrompt_CONTRACTID].getService(nsIPromptService); const gPrefService = Components.classes[nsPrefService_CONTRACTID].getService(nsIPrefService); -const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); +const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); const gClipboardHelper = Components.classes[nsClipboardHelper_CONTRACTID].getService(nsIClipboardHelper); const gAtomService = Components.classes[nsAtomService_CONTRACTID].getService(nsIAtomService); diff --git a/mozilla/toolkit/mozapps/downloads/content/downloads.js b/mozilla/toolkit/mozapps/downloads/content/downloads.js index 94578dbdf68..2c714ac99b4 100644 --- a/mozilla/toolkit/mozapps/downloads/content/downloads.js +++ b/mozilla/toolkit/mozapps/downloads/content/downloads.js @@ -493,7 +493,7 @@ function Startup() // Set up AutoDownload display area initAutoDownloadDisplay(); var pbi = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranchInternal); + .getService(Components.interfaces.nsIPrefBranch2); pbi.addObserver("browser.download.", gDownloadPrefObserver, false); // Handlers for events generated by the Download Manager (download events) @@ -537,7 +537,7 @@ function Shutdown() gDownloadManager.saveState(); var pbi = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranchInternal); + .getService(Components.interfaces.nsIPrefBranch2); pbi.removeObserver("browser.download.", gDownloadPrefObserver); var observerService = Components.classes[kObserverServiceProgID] diff --git a/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in b/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in index 71ea7d7fee8..6f7bc8b1a3a 100644 --- a/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in +++ b/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in @@ -125,7 +125,7 @@ function nsUpdateService() this.watchForUpdates(); - var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver(PREF_UPDATE_APP_AUTOUPDATEENABLED, this, false); pbi.addObserver(PREF_UPDATE_APP_ENABLED, this, false); pbi.addObserver(PREF_UPDATE_EXTENSIONS_AUTOUPDATEENABLED, this, false); @@ -453,7 +453,7 @@ nsUpdateService.prototype = { gOS.removeObserver(this, "xpcom-shutdown"); // Clean up held observers etc to avoid leaks. - var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = gPref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(PREF_UPDATE_APP_AUTOUPDATEENABLED, this); pbi.removeObserver(PREF_UPDATE_APP_ENABLED, this); pbi.removeObserver(PREF_UPDATE_EXTENSIONS_AUTOUPDATEENABLED, this); diff --git a/mozilla/uriloader/prefetch/nsPrefetchService.cpp b/mozilla/uriloader/prefetch/nsPrefetchService.cpp index 92560eac22d..4e1ecdeba5d 100644 --- a/mozilla/uriloader/prefetch/nsPrefetchService.cpp +++ b/mozilla/uriloader/prefetch/nsPrefetchService.cpp @@ -40,7 +40,7 @@ #include "nsICategoryManager.h" #include "nsIObserverService.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIDocCharset.h" #include "nsIWebProgress.h" #include "nsCURILoader.h" @@ -227,7 +227,7 @@ nsPrefetchService::Init() nsresult rv; // read prefs and hook up pref observer - nsCOMPtr prefs(do_GetService(kPrefServiceCID, &rv)); + nsCOMPtr prefs(do_GetService(kPrefServiceCID, &rv)); if (NS_SUCCEEDED(rv)) { PRBool enabled; rv = prefs->GetBoolPref(PREFETCH_PREF, &enabled); diff --git a/mozilla/xpfe/bootstrap/mozilla-bin.order b/mozilla/xpfe/bootstrap/mozilla-bin.order index 04a7b934dad..10247dcf7f0 100644 --- a/mozilla/xpfe/bootstrap/mozilla-bin.order +++ b/mozilla/xpfe/bootstrap/mozilla-bin.order @@ -1412,7 +1412,7 @@ _._23nsDirectoryIteratorImpl _._19nsDirectoryIterator QueryInterface__13nsPrefServiceRC4nsIDPPv GetIID__13nsIPrefBranch -GetIID__21nsIPrefBranchInternal +GetIID__21nsIPrefBranch2 Release__13nsPrefService GetBranch__13nsPrefServicePCcPP13nsIPrefBranch QueryInterface__12nsPrefBranchRC4nsIDPPv diff --git a/mozilla/xpfe/browser/resources/content/navigator.js b/mozilla/xpfe/browser/resources/content/navigator.js index d66497f86d8..d9701658e61 100644 --- a/mozilla/xpfe/browser/resources/content/navigator.js +++ b/mozilla/xpfe/browser/resources/content/navigator.js @@ -212,7 +212,7 @@ const gPopupPrefListener = function addPrefListener(observer) { try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver(observer.domain, observer, false); } catch(ex) { dump("Failed to observe prefs: " + ex + "\n"); @@ -222,7 +222,7 @@ function addPrefListener(observer) function removePrefListener(observer) { try { - var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pref.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver(observer.domain, observer); } catch(ex) { dump("Failed to remove pref observer: " + ex + "\n"); diff --git a/mozilla/xpfe/browser/resources/content/urlbarBindings.xml b/mozilla/xpfe/browser/resources/content/urlbarBindings.xml index 61c20922a4d..417f4a1f711 100644 --- a/mozilla/xpfe/browser/resources/content/urlbarBindings.xml +++ b/mozilla/xpfe/browser/resources/content/urlbarBindings.xml @@ -8,7 +8,7 @@ @@ -65,7 +65,7 @@ prefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr prefBranchInt(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefBranchInt) prefBranchInt->AddObserver("browser.bookmarks.file", this, true); } diff --git a/mozilla/xpfe/components/history/resources/history.js b/mozilla/xpfe/components/history/resources/history.js index 5c4bdf0c7f3..22ed239ae61 100644 --- a/mozilla/xpfe/components/history/resources/history.js +++ b/mozilla/xpfe/components/history/resources/history.js @@ -101,7 +101,7 @@ function HistoryCommonInit() } else { // must be the sidebar panel var pb = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); - var pbi = pb.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pb.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.addObserver("browser.history.grouping", groupObserver, false); } } @@ -116,7 +116,7 @@ function HistoryCommonInit() function HistoryPanelUnload() { var pb = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); - var pbi = pb.QueryInterface(Components.interfaces.nsIPrefBranchInternal); + var pbi = pb.QueryInterface(Components.interfaces.nsIPrefBranch2); pbi.removeObserver("browser.history.grouping", groupObserver, false); } diff --git a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp index 9d6d023874f..b29c489ea27 100644 --- a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp @@ -81,7 +81,7 @@ #include "nsIMdbFactoryFactory.h" #include "nsIPrefService.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIObserverService.h" #include "nsITextToSubURI.h" @@ -2409,7 +2409,7 @@ nsGlobalHistory::Init() gPrefBranch->GetIntPref(PREF_BROWSER_HISTORY_EXPIRE_DAYS, &mExpireDays); gPrefBranch->GetBoolPref(PREF_AUTOCOMPLETE_ONLY_TYPED, &mAutocompleteOnlyTyped); - nsCOMPtr pbi = do_QueryInterface(gPrefBranch); + nsCOMPtr pbi = do_QueryInterface(gPrefBranch); if (pbi) { pbi->AddObserver(PREF_AUTOCOMPLETE_ONLY_TYPED, this, PR_FALSE); pbi->AddObserver(PREF_BROWSER_HISTORY_EXPIRE_DAYS, this, PR_FALSE); diff --git a/mozilla/xpfe/components/intl/nsCharsetMenu.cpp b/mozilla/xpfe/components/intl/nsCharsetMenu.cpp index 9c84b855ecb..9acef053385 100644 --- a/mozilla/xpfe/components/intl/nsCharsetMenu.cpp +++ b/mozilla/xpfe/components/intl/nsCharsetMenu.cpp @@ -52,7 +52,7 @@ #include "nsILocaleService.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" -#include "nsIPrefBranchInternal.h" +#include "nsIPrefBranch2.h" #include "nsIPrefLocalizedString.h" #include "nsICurrentCharsetListener.h" #include "nsQuickSort.h" @@ -847,7 +847,7 @@ nsresult nsCharsetMenu::FreeResources() nsresult res = NS_OK; if (mCharsetMenuObserver) { - nsCOMPtr pbi = do_QueryInterface(mPrefs); + nsCOMPtr pbi = do_QueryInterface(mPrefs); if (pbi) { pbi->RemoveObserver(kBrowserStaticPrefKey, mCharsetMenuObserver); pbi->RemoveObserver(kMaileditPrefKey, mCharsetMenuObserver); @@ -898,7 +898,7 @@ nsresult nsCharsetMenu::InitBrowserMenu() NS_ASSERTION(NS_SUCCEEDED(res), "error initializing browser cache charset menu"); // register prefs callback - nsCOMPtr pbi = do_QueryInterface(mPrefs); + nsCOMPtr pbi = do_QueryInterface(mPrefs); if (pbi) res = pbi->AddObserver(kBrowserStaticPrefKey, mCharsetMenuObserver, PR_FALSE); } @@ -938,7 +938,7 @@ nsresult nsCharsetMenu::InitMaileditMenu() NS_ASSERTION(NS_SUCCEEDED(res), "error initializing mailedit charset menu from prefs"); // register prefs callback - nsCOMPtr pbi = do_QueryInterface(mPrefs); + nsCOMPtr pbi = do_QueryInterface(mPrefs); if (pbi) res = pbi->AddObserver(kMaileditPrefKey, mCharsetMenuObserver, PR_FALSE); } diff --git a/mozilla/xpfe/global/resources/content/bindings/toolbar.xml b/mozilla/xpfe/global/resources/content/bindings/toolbar.xml index 78c53092e0d..e5400abda99 100644 --- a/mozilla/xpfe/global/resources/content/bindings/toolbar.xml +++ b/mozilla/xpfe/global/resources/content/bindings/toolbar.xml @@ -149,7 +149,7 @@ Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService).getBranch(null) - .QueryInterface(Components.interfaces.nsIPrefBranchInternal) + .QueryInterface(Components.interfaces.nsIPrefBranch2) diff --git a/mozilla/xpfe/global/resources/content/config.js b/mozilla/xpfe/global/resources/content/config.js index b4841d1807d..1773d0f3879 100644 --- a/mozilla/xpfe/global/resources/content/config.js +++ b/mozilla/xpfe/global/resources/content/config.js @@ -55,7 +55,7 @@ const nsAtomService_CONTRACTID = "@mozilla.org/atom-service;1"; const gPromptService = Components.classes[nsPrompt_CONTRACTID].getService(nsIPromptService); const gPrefService = Components.classes[nsPrefService_CONTRACTID].getService(nsIPrefService); -const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranchInternal); +const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Components.interfaces.nsIPrefBranch2); const gClipboardHelper = Components.classes[nsClipboardHelper_CONTRACTID].getService(nsIClipboardHelper); const gAtomService = Components.classes[nsAtomService_CONTRACTID].getService(nsIAtomService);