Bug 1125411 - OSX: turn CoreLocation provider on, r=cpeterson
☠☠ backed out by 740907c7d4ca ☠ ☠
authorGarvan Keeley <gkeeley@mozilla.com>
Mon, 26 Jan 2015 12:25:00 +0100
changeset 239308 32fe616d49503106a386d172ca2367453c2de77b
parent 239307 cc42921d3f3603b6983a6edd008296c8fbe8b1bd
child 239309 9e060a6c859ecb71ae6499e0ecdddcacde44f8e4
push id497
push usermleibovic@mozilla.com
push dateWed, 28 Jan 2015 16:43:37 +0000
reviewerscpeterson
bugs1125411
milestone38.0a1
Bug 1125411 - OSX: turn CoreLocation provider on, r=cpeterson Also, expose this setting in about:config
browser/app/profile/firefox.js
dom/geolocation/nsGeolocation.cpp
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1706,16 +1706,21 @@ pref("plain_text.wrap_long_lines", true)
 
 // If this turns true, Moz*Gesture events are not called stopPropagation()
 // before content.
 pref("dom.debug.propagate_gesture_events_through_content", false);
 
 // The request URL of the GeoLocation backend.
 pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
 
+// On Mac, the default geo provider is corelocation.
+#ifdef XP_MACOSX
+pref("geo.provider.use_corelocation", true);
+#endif
+
 // Necko IPC security checks only needed for app isolation for cookies/cache/etc:
 // currently irrelevant for desktop e10s
 pref("network.disable.ipc.security", true);
 
 // CustomizableUI debug logging.
 pref("browser.uiCustomization.debug", false);
 
 // CustomizableUI state of the browser's user interface
--- a/dom/geolocation/nsGeolocation.cpp
+++ b/dom/geolocation/nsGeolocation.cpp
@@ -804,17 +804,17 @@ nsresult nsGeolocationService::Init()
   // do_getService gets hold of the already initialized component and starts
   // processing location requests immediately.
   // do_Createinstance will create multiple instances of the provider which is not right.
   // bug 993041
   mProvider = do_GetService(GONK_GPS_GEOLOCATION_PROVIDER_CONTRACTID);
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
-  if (Preferences::GetBool("geo.provider.use_corelocation", false)) {
+  if (Preferences::GetBool("geo.provider.use_corelocation", true)) {
     mProvider = new CoreLocationLocationProvider();
   }
 #endif
 
 #ifdef XP_WIN
   if (Preferences::GetBool("geo.provider.ms-windows-location", false)) {
     mProvider = new WindowsLocationProvider();
   }