Bug 1352343 - Rename LocaleService::On* methods to LocaleService::*. r=jfkthame
☠☠ backed out by 15751b4cd7c9 ☠ ☠
authorZibi Braniecki <zbraniecki@mozilla.com>
Tue, 10 Oct 2017 10:39:12 -0700
changeset 436143 279dc744683e449887790e910283980e64c0a2c8
parent 436142 0699fcfd990f311e3aa0aee3015047d9e5adc557
child 436144 15751b4cd7c9c3d710d817b4b4eb211c5d91e5fe
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1352343
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352343 - Rename LocaleService::On* methods to LocaleService::*. r=jfkthame MozReview-Commit-ID: LvEW9GcOodb
chrome/nsChromeRegistryChrome.cpp
intl/locale/LocaleService.cpp
intl/locale/LocaleService.h
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -734,17 +734,17 @@ nsChromeRegistryChrome::ManifestLocale(M
   nsresult rv = OverrideLocalePackage(NS_LITERAL_CSTRING("global"), mainPackage);
   if (NS_FAILED(rv)) {
     return;
   }
 
   if (mainPackage.Equals(package)) {
     // We should refresh the LocaleService, since the available
     // locales changed.
-    LocaleService::GetInstance()->OnAvailableLocalesChanged();
+    LocaleService::GetInstance()->AvailableLocalesChanged();
   }
 }
 
 void
 nsChromeRegistryChrome::ManifestSkin(ManifestProcessingContext& cx, int lineno,
                                      char *const * argv, int flags)
 {
   char* package = argv[0];
--- a/intl/locale/LocaleService.cpp
+++ b/intl/locale/LocaleService.cpp
@@ -277,44 +277,44 @@ LocaleService::GetAvailableLocales(nsTAr
   }
 
   aRetVal = mAvailableLocales;
   return true;
 }
 
 
 void
-LocaleService::OnAvailableLocalesChanged()
+LocaleService::AvailableLocalesChanged()
 {
   MOZ_ASSERT(mIsServer, "This should only be called in the server mode.");
   mAvailableLocales.Clear();
   // In the future we may want to trigger here intl:available-locales-changed
-  OnLocalesChanged();
+  LocalesChanged();
 }
 
 void
-LocaleService::OnRequestedLocalesChanged()
+LocaleService::RequestedLocalesChanged()
 {
   MOZ_ASSERT(mIsServer, "This should only be called in the server mode.");
 
   nsTArray<nsCString> newLocales;
   ReadRequestedLocales(newLocales);
 
   if (mRequestedLocales != newLocales) {
     mRequestedLocales = Move(newLocales);
     nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
     if (obs) {
       obs->NotifyObservers(nullptr, "intl:requested-locales-changed", nullptr);
     }
-    OnLocalesChanged();
+    LocalesChanged();
   }
 }
 
 void
-LocaleService::OnLocalesChanged()
+LocaleService::LocalesChanged()
 {
   MOZ_ASSERT(mIsServer, "This should only be called in the server mode.");
 
   // if mAppLocales has not been initialized yet, just return
   if (mAppLocales.IsEmpty()) {
     return;
   }
 
@@ -527,30 +527,30 @@ LocaleService::IsAppLocaleRTL()
 
 NS_IMETHODIMP
 LocaleService::Observe(nsISupports *aSubject, const char *aTopic,
                       const char16_t *aData)
 {
   MOZ_ASSERT(mIsServer, "This should only be called in the server mode.");
 
   if (!strcmp(aTopic, INTL_SYSTEM_LOCALES_CHANGED)) {
-    OnRequestedLocalesChanged();
+    RequestedLocalesChanged();
   } else {
     NS_ConvertUTF16toUTF8 pref(aData);
 
     // This is a temporary solution until we get bug 1337078 landed.
     if (pref.EqualsLiteral(ANDROID_OS_LOCALE_PREF)) {
       OSPreferences::GetInstance()->Refresh();
     }
     // At the moment the only thing we're observing are settings indicating
     // user requested locales.
     if (pref.EqualsLiteral(MATCH_OS_LOCALE_PREF) ||
         pref.EqualsLiteral(SELECTED_LOCALE_PREF) ||
         pref.EqualsLiteral(ANDROID_OS_LOCALE_PREF)) {
-      OnRequestedLocalesChanged();
+      RequestedLocalesChanged();
     }
   }
 
   return NS_OK;
 }
 
 bool
 LocaleService::LanguagesMatch(const nsCString& aRequested,
--- a/intl/locale/LocaleService.h
+++ b/intl/locale/LocaleService.h
@@ -208,19 +208,19 @@ public:
    * LocaleService itself, but in a couple special cases, we have the
    * other component call this manually instead of sending a global event.
    *
    * If the result differs from the previous list, it will additionally
    * trigger a corresponding event
    *
    * This code should be called only in the server mode..
    */
-  void OnAvailableLocalesChanged();
-  void OnRequestedLocalesChanged();
-  void OnLocalesChanged();
+  void AvailableLocalesChanged();
+  void RequestedLocalesChanged();
+  void LocalesChanged();
 
   /**
    * Negotiates the best locales out of an ordered list of requested locales and
    * a list of available locales.
    *
    * Internally it uses the following naming scheme:
    *
    *  Requested - locales requested by the user