Bug 597296 followup - Move the implementation of nsChromeRegistryChrome::UpdateSelectedLocale out of MOZ_IPC #ifdef to fix no-IPC builds; a=bustage DONTBUILD
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 30 Nov 2010 11:16:37 -0500
changeset 58376 0ebeeb2fae57ff3445a37062174916e52e6ac307
parent 58375 630b08a7fe632dd311f78b23e17e4c78458d6cbd
child 58377 96f033fe78c03a907572f8149eabbd63bb4667e4
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbustage
bugs597296
milestone2.0b8pre
Bug 597296 followup - Move the implementation of nsChromeRegistryChrome::UpdateSelectedLocale out of MOZ_IPC #ifdef to fix no-IPC builds; a=bustage DONTBUILD
chrome/src/nsChromeRegistryChrome.cpp
--- a/chrome/src/nsChromeRegistryChrome.cpp
+++ b/chrome/src/nsChromeRegistryChrome.cpp
@@ -423,16 +423,31 @@ nsChromeRegistryChrome::CheckForNewChrom
   mOverlayHash.Clear();
   mStyleHash.Clear();
   mOverrideTable.Clear();
 
   nsComponentManagerImpl::gComponentManager->RereadChromeManifests();
   return NS_OK;
 }
 
+void nsChromeRegistryChrome::UpdateSelectedLocale()
+{
+  nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
+  if (prefs) {
+    nsresult rv = SelectLocaleFromPref(prefs);
+    if (NS_SUCCEEDED(rv)) {
+      nsCOMPtr<nsIObserverService> obsSvc =
+        mozilla::services::GetObserverService();
+      NS_ASSERTION(obsSvc, "Couldn't get observer service.");
+      obsSvc->NotifyObservers((nsIChromeRegistry*) this,
+                              "selected-locale-has-changed", nsnull);
+    }
+  }
+}
+
 #ifdef MOZ_IPC
 static void
 SerializeURI(nsIURI* aURI,
              SerializedURI& aSerializedURI)
 {
   if (!aURI)
     return;
 
@@ -462,31 +477,16 @@ EnumerateOverride(nsIURI* aURIKey,
 
 struct EnumerationArgs
 {
   InfallibleTArray<ChromePackage>& packages;
   const nsCString& selectedLocale;
   const nsCString& selectedSkin;
 };
 
-void nsChromeRegistryChrome::UpdateSelectedLocale()
-{
-  nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
-  if (prefs) {
-    nsresult rv = SelectLocaleFromPref(prefs);
-    if (NS_SUCCEEDED(rv)) {
-      nsCOMPtr<nsIObserverService> obsSvc =
-        mozilla::services::GetObserverService();
-      NS_ASSERTION(obsSvc, "Couldn't get observer service.");
-      obsSvc->NotifyObservers((nsIChromeRegistry*) this,
-                              "selected-locale-has-changed", nsnull);
-    }
-  }
-}
-
 void
 nsChromeRegistryChrome::SendRegisteredChrome(
     mozilla::dom::PContentParent* aParent)
 {
   InfallibleTArray<ChromePackage> packages;
   InfallibleTArray<ResourceMapping> resources;
   InfallibleTArray<OverrideMapping> overrides;