Commit Graph

28 Commits

Author SHA1 Message Date
Zibi Braniecki
8a3a8e60ed 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
2017-03-26 07:09:45 +02:00
Zibi Braniecki
165d58b836 Bug 1347306 - Hand over language negotiation from ChromeRegistry to LocaleService. r=jfkthame
MozReview-Commit-ID: RIPZUHN4LW
2017-03-14 15:28:47 -07:00
Zibi Braniecki
869fd1cd99 Bug 1332207 - Introduce mozilla::intl::LocaleService. r=jfkthame
MozReview-Commit-ID: AV1bvCt6tmP
2017-01-25 15:58:14 -08:00
Wei-Cheng Pan
a76374bf51 Bug 1323946 - Use MOZ_MUST_USE for netwerk/protocol/res r=valentin
MozReview-Commit-ID: 7tcOml6jKdj
2016-11-04 18:13:13 +08:00
Jonathan Kew
e4f4441be3 Bug 1301655 - pt 0 - Add an optional parameter to nsIChromeRegistry.getSelectedLocale to allow callers to request the locale be returned as a valid BCP47 lang tag. r=gandalf 2016-10-28 12:04:06 +01:00
Nicholas Nethercote
7b5df070f0 Bug 1297300 - Add missing checks to GetSpec() calls in netwerk/. r=hurley,dragana. 2016-08-26 16:40:57 +10:00
Nicholas Nethercote
887efe04d5 Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.
2016-09-01 15:01:16 +10:00
Kan-Ru Chen
a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Nicholas Nethercote
195ee7e08a Bug 1278439 - Adding a missing prefs service null check in chrome/. r=froydnj. 2016-07-14 13:47:49 +10:00
Nicholas Nethercote
3d410fab88 Bug 1186787 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in chrome/ with iterators. r=froydnj. 2015-11-17 17:58:36 -08:00
Nicholas Nethercote
17e1a339b1 Bug 1186787 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in chrome/ with iterators. r=froydnj. 2015-11-17 17:58:34 -08:00
Birunthan Mohanathas
ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Neil Deakin
f66c954769 Bug 1101115, implement nsChromeRegistryContent::IsLocaleRTL so that file directory view works in e10s rtl mode, r=bsmedberg 2015-08-28 03:13:06 -04:00
Bobby Holley
b9d62fb18a Bug 1161831 - Factor the sharable bits out of nsIResProtocolHandler. r=billm 2015-07-21 12:57:21 -07:00
Gijs Kruitbosch
defb618b14 Bug 1170207 - allow overrides of chrome://../skin/ URIs with other chrome://../skin/ URIs within skin manifests, r=bsmedberg 2015-06-01 17:05:39 +01:00
Dave Townsend
60900c154d Bug 1083281: Use flags to determine which chrome and about URIs are loaded in the content process. r=mconley, r=bsmedberg, r=jduell, r=mratcliffe 2015-02-05 08:09:15 -08:00
Dave Townsend
54a848fc76 Backing out 580a54390e83 from bug 1083281 due to devtools test failures. CLOSED TREE 2015-02-03 15:51:24 -08:00
Dave Townsend
921bd9912f Bug 1083281: Use flags to determine which chrome and about URIs are loaded in the content process. r=mconley, r=bsmedberg, r=jduell 2015-01-07 15:56:18 -08:00
Dave Townsend
0610cd321a Bug 1068412: Forward dynamically registered resource URI mappings to content processes. r=billm 2014-10-07 10:29:40 -07:00
Ryan VanderMeulen
a4373a38d8 Backed out changeset f4953072c20f (bug 1068412) for mochitest-e10s crashes. 2014-10-06 17:00:27 -04:00
Dave Townsend
a602e4960c Bug 1068412: Forward dynamically registered resource URI mappings to content processes. r=billm 2014-10-06 12:42:12 -07:00
Mike Hommey
254e1b7a2d Bug 1072152 - Change chrome.manifest read order. r=bsmedberg
In case of multiple "resource" manifest entries for the same keyword, the
last registered one now takes precedence, like any other chrome manifest
entry.
2014-09-25 14:47:03 +09:00
Gijs Kruitbosch
61b247248e Bug 1034999 - fix XUL cache and overlay system to ignore refs/hashes, r=smaug,mossop 2014-09-16 14:57:45 +02:00
Blake Kaplan
8bcbfc5876 Bug 1051102 - Make mPackagesHash be a more modern hashtable. r=bsmedberg 2014-08-11 11:13:36 -07:00
Ehsan Akhgari
96d53bc5a4 Bug 579517 follow-up: Remove NSPR types that crept in 2014-08-08 08:39:07 -04:00
Nicholas Nethercote
663b82ea3b Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params
2014-08-06 06:31:21 -07:00
Blake Kaplan
3c98d405c1 Bug 687194 - Update content processes when dynamic chrome registration occurs. r=mossop 2014-07-25 16:17:36 -04:00
Birunthan Mohanathas
6e8baa06a9 Bug 1041208 - Flatten chrome/{public,src}/ directories. r=mossop 2014-07-19 12:43:38 -07:00