Open Bug 803167 Opened 12 years ago Updated 2 years ago

build option to enable/disable the network geolocation provider.

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect

Tracking

(blocking-basecamp:-)

blocking-basecamp -

People

(Reporter: dougt, Unassigned)

Details

Attachments

(1 file)

Currently, we build the network geolocation provider (/dom/system/NetworkGeolocationProvider.js) on almost all platforms.  The implementation is tightly coupled to the Google Location Service.  It really shouldn't be part of B2G or XR without someone specifically enabling it.  So, instead of configuring this option based on platform type, I'd like to have a specific configure option.


We need to be able to turn off GLS for basecamp.
Attached patch patch v.1Splinter Review
Attachment #672835 - Flags: review?(ted)
The problem with these kind of approaches is that is makes is impossible to add it on Firefox-on-Xulrunner builds without making it available to all xulrunner applications. It would be better to enable it with a runtime pref that would be disabled in greprefs.js but enabled at the browser level.
(In reply to Mike Hommey [:glandium] from comment #2)
> The problem with these kind of approaches is that is makes is impossible to
                                                    it       it
I think a nice way to fix this for geolocation providers is to register NetworkGeolocationProvider with the category manager, remove the hardcoded registration from dom/src/geolocation/nsGeolocation.cpp, and add code that only adds the geolocation providers gotten from the category-manager if asome pref is set to true. The pref name could be something like the category name prefixed with geo.category. .
It's not clear why this should block so I'm going to - it.  Obviously if you disagree, please re-nom and provide a bit of justification.  Thanks.
blocking-basecamp: ? → -
Who makes Firefox-on-Xulrunner builds?
(In reply to Doug Turner (:dougt) from comment #6)
> Who makes Firefox-on-Xulrunner builds?

At least Fedora and Debian.
Comment on attachment 672835 [details] [diff] [review]
patch v.1

Review of attachment 672835 [details] [diff] [review]:
-----------------------------------------------------------------

we should go with something like mike suggests.
Attachment #672835 - Flags: review?(ted)
really, the point of this is so that we don't have people using the GLS API without permission from Google.  Maybe we should just have a preference checked in WifiGeoPositionProvider.start().
Mike,

there is a big difference between:

http://mxr.mozilla.org/mozilla-central/source/browser/confvars.sh
and
http://mxr.mozilla.org/mozilla-central/source/xulrunner/confvars.sh

What does firefox on xul do for the other build configure options?
s/xul/xulrunner
(In reply to Doug Turner (:dougt) from comment #10)
> Mike,
> 
> there is a big difference between:
> 
> http://mxr.mozilla.org/mozilla-central/source/browser/confvars.sh
> and
> http://mxr.mozilla.org/mozilla-central/source/xulrunner/confvars.sh
> 
> What does firefox on xul do for the other build configure options?

Apart from MOZ_MEDIA_NAVIGATOR, all options in browser/confvars.sh are browser/ specific.
I am thinking about:

20 MOZ_SAFE_BROWSING=1


This is very similar.  Mozilla has a relationship with Google to provider a safe browser API.  The Network Geolocation code is similar.  Wifi/IP to Geolocation is provided by Google via their GLS API.

The Network Geolocation provider should be part of non-firefox XULRunner apps.  the Network Geolocation provider should be part of B2G.

Do we ship Safe Browsing to all xulrunner applications?
(In reply to Doug Turner (:dougt) from comment #13)
> I am thinking about:
> 
> 20 MOZ_SAFE_BROWSING=1

This enables code that lives under browser/
okay.  That makes sense.

Maybe the best thing is to NetworkGeolocationProvider.js into browser/.  We will have to factor out the testing bits of NetworkGeolocationProvider.js, but that shouldn't be too bad.

Josh -- thoughts on the above?
unassigning things that I am not working on.
Assignee: doug.turner → nobody
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: