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 154216 3258ea7e136cc5f4baec2a8c63c5a29c72fbd597
parent 154215 e5848db83ea70ea744e2867f64e7d46c3045583c
child 154217 68bea7ee703d45fa06473d87297d7aef84020e2f
push id2924
push userryanvm@gmail.com
push dateMon, 14 Oct 2013 21:07:30 +0000
treeherdermozilla-beta@3258ea7e136c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, akeybl
bugs923618
milestone25.0
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
@@ -674,17 +674,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)) {