gecko-dev/toolkit/mozapps
Zibi Braniecki a1a4f0b7c9 Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK

--HG--
extra : rebase_source : 883a91b249b6953b7872bfb9a8851e8be7257c7b
2017-03-11 18:43:11 -08:00
..
downloads Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
extensions Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike 2017-03-11 18:43:11 -08:00
handling Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
installer Bug 1351067 - add BUG_COMPONENT to toolkit/* files. r=myk,enndeakin,mossop 2017-04-09 05:43:43 -04:00
preferences Bug 1351067 - add BUG_COMPONENT to toolkit/* files. r=myk,enndeakin,mossop 2017-04-09 05:43:43 -04:00
update Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00