"distribution" searchplugins dont work for complex general.useragent.locale

RESOLVED FIXED in Firefox 14

Status

()

Firefox
Search
RESOLVED FIXED
8 years ago
5 years ago

People

(Reporter: Alexander Sack, Assigned: glandium)

Tracking

unspecified
Firefox 14
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

8 years ago
currently the localized searchengines feature for "distribution/searchplugins" is broken for builds that use a complex pref for general.useragent.locale - which is what we don in ubuntu

Also its not possible to overload searchplugins in the "common" directory in the locale folder, which could be fixed by changing the order of the searchplugindirs returned in browser/components/dirprovider/nsBrowserDirectoryProvider.cpp ... which I would like to address in the same patch.
(Reporter)

Comment 1

8 years ago
Created attachment 399299 [details] [diff] [review]
patch 1
(Reporter)

Comment 2

8 years ago
Created attachment 399302 [details] [diff] [review]
patch 1 without garbage
Attachment #399299 - Attachment is obsolete: true
Assignee: nobody → asac
Status: NEW → ASSIGNED
(Reporter)

Comment 3

8 years ago
Created attachment 399338 [details] [diff] [review]
patch 2 - use global chrome registry selectedLocale
Attachment #399302 - Attachment is obsolete: true
Created attachment 600753 [details] [diff] [review]
Try getting general.useragent.locale as a complex value first in DirectoryProvider.cpp

Only the first paragraph of comment 0 still applies. Instead of using Alex's approach of using chrome registry, I'm just using GetComplexValue, fallbacking to GetChar if that fails, which is what all other code paths getting general.user-agent.locale are using.
Attachment #399338 - Attachment is obsolete: true
Assignee: asac → mh+mozilla
Comment on attachment 600753 [details] [diff] [review]
Try getting general.useragent.locale as a complex value first in DirectoryProvider.cpp

It might be nice to make this use mozilla::Preferences while we're changing this.
Comment on attachment 600753 [details] [diff] [review]
Try getting general.useragent.locale as a complex value first in DirectoryProvider.cpp

[It's annoying when hg bzexport silently doesn't put the requested review flag for some reason]
Attachment #600753 - Flags: review?(benjamin)
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #5)
> Comment on attachment 600753 [details] [diff] [review]
> Try getting general.useragent.locale as a complex value first in
> DirectoryProvider.cpp
> 
> It might be nice to make this use mozilla::Preferences while we're changing
> this.

Unfortunately, mozilla::Preferences is an internal API, and as such is not available from browser.
Attachment #600753 - Flags: review?(benjamin) → review+
Comment on attachment 600753 [details] [diff] [review]
Try getting general.useragent.locale as a complex value first in DirectoryProvider.cpp

of course - I forgot this was in browsercomps
https://hg.mozilla.org/integration/mozilla-inbound/rev/5689de2cf0f8
https://hg.mozilla.org/mozilla-central/rev/5689de2cf0f8
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
You need to log in before you can comment on or make changes to this bug.