gecko-dev/intl
Zibi Braniecki 7ff88a7209 Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot
LocaleService serves two main functions. It is a central place for all code in the
engine to learn about locales, but it also does the language negotiation and selection.

The former is relevant in all processes, but the latter should only be performed
by the "main" process. In case of current Desktop Firefox, the parent process
is the one performing all the language negotiation, and content processes should
operate in the "client" mode.
In Fennec, there's a Java app on top of Gecko which should work as a "server"
and then all processes, including parent process of Gecko is merely a "client" for that.

This refactor finalizes this duality making it easily configurable to define in
which mode a given LocaleService operates.

The server-client model allows all clients to stay in sync with the server,
but operate transparently for all callers just returning the right values.

In order to initialize LocaleService in the client mode in child process with the
right locales I'm adding the list of app locales to the XPCOMInitData,
and then fire LocaleService::SetAppLocales in the child process initialization.

In order to keep the list up to date, I'm adding intl:app-locales-changed to
the list of observed topics, and when triggered, I send the updated list
to the child process, which updates LocaleService::SetAppLocales with the new
list.

MozReview-Commit-ID: K9X6berF3IO

--HG--
extra : rebase_source : ca5e502d064023fddfd63fe6fe5eccefce8dee52
2017-03-26 07:09:45 +02:00
..
build Bug 943287 - Part 2. Use ICU version of nsICollation on all platform. r=hsivonen 2017-03-23 13:42:49 +09:00
chardet Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
hyphenation Bug 1341653 - Add NEWS to the local hyphen checkout to more easily track future updates. r=tjr 2017-02-27 14:25:27 -05:00
icu Bug 1345336 - Part 1. Remove empty zoneStrings entries. r=Waldo 2017-03-13 13:37:47 +09:00
icu-patches Bug 1325858 - Redundant handles open for HKLM\SYSTEM\ControlSet001\Control\TimeZoneInformation r=andrebargull 2016-12-30 16:36:05 +00:00
locale Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot 2017-03-26 07:09:45 +02:00
locales Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
lwbrk Bug 1342686 - Fix up the handling of surrogates in nsJISx4051LineBreaker. r=emk 2017-03-01 22:47:56 +00:00
strres Bug 1005640 - Flush StringBundle cache when app-locales change. r=valentin 2017-04-18 01:03:05 -07:00
tzdata Bug 1353649 - Update tzdata in ICU data files to 2017b. r=Waldo 2017-04-05 10:49:53 +02:00
uconv Bug 1356843 - Fix -Wcomma warning in intl/uconv/util/nsUCSupport.cpp. r=dholbert 2017-04-08 01:05:19 -07:00
unicharutil Backed out 3 changesets (bug 1353000) for devtools failures a=backout CLOSED TREE 2017-04-12 10:59:12 -07:00
icu_sources_data.py Bug 1284406 part 3 - Export ICU headers in include/unicode. r=glandium 2016-07-20 15:00:13 +10:00
moz.build Bug 1333451 - add BUG_COMPONENT to intl/* files. r=m_kato 2017-01-27 08:18:44 -05:00
update-icu.sh Bug 1324240 - Also set LANGUAGE environment variable to ensure svn uses English instead of the OS locale. r=Waldo 2017-04-05 10:41:42 +02:00
update-tzdata.sh Bug 1324240 - Also set LANGUAGE environment variable to ensure svn uses English instead of the OS locale. r=Waldo 2017-04-05 10:41:42 +02:00