Bug 977454 - export network location provider on b2g. r=khuey
☠☠ backed out by 6beb83e91a7d ☠ ☠
authorDoug Turner <doug.turner@gmail.com>
Tue, 25 Feb 2014 16:06:01 -0800
changeset 171343 4c4041cfc09528a9b96439893932e50eb42aaa1b
parent 171342 74ec9c7f21b80a20a81f24ee1eff2cf4dc752e69
child 171344 0d71b60afe52ec807c59be1ee2a7763f84e3ccc8
push id40438
push userdougt@mozilla.com
push dateSat, 01 Mar 2014 01:30:42 +0000
treeherdermozilla-inbound@0d71b60afe52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs977454
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 977454 - export network location provider on b2g. r=khuey
b2g/installer/package-manifest.in
configure.in
dom/src/geolocation/nsGeolocation.cpp
dom/system/NetworkGeolocationProvider.manifest
dom/system/moz.build
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -370,16 +370,18 @@
 @BINPATH@/components/BrowserPlaces.manifest
 @BINPATH@/components/toolkitsearch.manifest
 @BINPATH@/components/nsTryToClose.manifest
 @BINPATH@/components/nsTryToClose.js
 @BINPATH@/components/passwordmgr.manifest
 @BINPATH@/components/nsLoginInfo.js
 @BINPATH@/components/nsLoginManager.js
 @BINPATH@/components/nsLoginManagerPrompter.js
+@BINPATH@/components/NetworkGeolocationProvider.manifest
+@BINPATH@/components/NetworkGeolocationProvider.js
 #ifdef MOZ_WEBRTC
 @BINPATH@/components/PeerConnection.js
 @BINPATH@/components/PeerConnection.manifest
 #endif
 @BINPATH@/components/SiteSpecificUserAgent.js
 @BINPATH@/components/SiteSpecificUserAgent.manifest
 @BINPATH@/components/storage-mozStorage.js
 @BINPATH@/components/crypto-SDR.js
--- a/configure.in
+++ b/configure.in
@@ -8094,22 +8094,17 @@ for p in $NECKO_PROTOCOLS; do
     _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_PROTOCOL_$p"
 done
 
 dnl
 dnl option to disable necko's wifi scanner
 dnl
 
 case "$OS_TARGET" in
-  Android)
-    if test -n "$gonkdir"; then
-      NECKO_WIFI=1
-    fi
-    ;;
-  Darwin|SunOS|WINNT)
+  Android|Darwin|SunOS|WINNT)
     NECKO_WIFI=1
     ;;
   Linux)
     NECKO_WIFI=1
     NECKO_WIFI_DBUS=1
     ;;
 esac
 
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -689,16 +689,20 @@ nsresult nsGeolocationService::Init()
 
 #ifdef MOZ_WIDGET_COCOA
   if (Preferences::GetBool("geo.provider.use_corelocation", true) &&
       CoreLocationLocationProvider::IsCoreLocationAvailable()) {
     mProvider = new CoreLocationLocationProvider();
   }
 #endif
 
+  if (Preferences::GetBool("geo.provider.use_mls", false)) {
+    mProvider = do_GetService("@mozilla.org/geolocation/mls-provider;1");
+  }
+
   // Override platform-specific providers with the default (network)
   // provider while testing. Our tests are currently not meant to exercise
   // the provider, and some tests rely on the network provider being used.
   // "geo.provider.testing" is always set for all plain and browser chrome
   // mochitests, and also for xpcshell tests.
   if (!mProvider || Preferences::GetBool("geo.provider.testing", false)) {
     nsCOMPtr<nsIGeolocationProvider> override =
       do_GetService(NS_GEOLOCATION_PROVIDER_CONTRACTID);
--- a/dom/system/NetworkGeolocationProvider.manifest
+++ b/dom/system/NetworkGeolocationProvider.manifest
@@ -1,2 +1,3 @@
 component {77DA64D3-7458-4920-9491-86CC9914F904} NetworkGeolocationProvider.js
 contract @mozilla.org/geolocation/provider;1 {77DA64D3-7458-4920-9491-86CC9914F904}
+contract @mozilla.org/geolocation/mls-provider;1 {77DA64D3-7458-4920-9491-86CC9914F904}
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -33,23 +33,20 @@ EXPORTS.mozilla += [
     'OSFileConstants.h',
 ]
 
 UNIFIED_SOURCES += [
     'nsDeviceSensors.cpp',
     'OSFileConstants.cpp',
 ]
 
-# On Systems that have build in geolocation providers,
-# we really do not need these.
-if CONFIG['OS_TARGET'] != 'Android' or CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
-    EXTRA_COMPONENTS += [
-        'NetworkGeolocationProvider.js',
-        'NetworkGeolocationProvider.manifest',
-    ]
+EXTRA_COMPONENTS += [
+    'NetworkGeolocationProvider.js',
+    'NetworkGeolocationProvider.manifest',
+]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'gklayout'
 # We fire the nsDOMDeviceAcceleration
 LOCAL_INCLUDES += [