Bug 923618 - Pref off native core location geolocation backend. r=jdm, a=akeybl
authorDoug Turner <doug.turner@gmail.com>
Sat, 12 Oct 2013 13:56:37 -0400
changeset 160675 5ce2322ee9100cf6d8502f6bb44b5909191ab428
parent 160674 f1afcd8a4d5b1a33c395cab7b12b1bd4f6a01843
child 160676 d38bb5b38b7f94742eef65f491fd8c1eefa79263
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, akeybl
bugs923618
milestone26.0a2
Bug 923618 - Pref off native core location geolocation backend. r=jdm, a=akeybl
dom/src/geolocation/nsGeolocation.cpp
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -693,17 +693,19 @@ nsresult nsGeolocationService::Init()
   mProvider = new AndroidLocationProvider();
 #endif
 
 #ifdef MOZ_WIDGET_GONK
   mProvider = do_GetService(GONK_GPS_GEOLOCATION_PROVIDER_CONTRACTID);
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
-  mProvider = new CoreLocationLocationProvider();
+  if (Preferences::GetBool("geo.provider.use_corelocation", false)) {
+    mProvider = new CoreLocationLocationProvider();
+  }
 #endif
 
   // 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)) {