Backed out changeset 39b20dac431b (bug 1063572) for causing bustages at GeoclueLocationProvider. CLOSED TREE

This commit is contained in:
Butkovits Atila 2022-05-15 15:28:12 +03:00
Родитель bff064393f
Коммит f3f0323cc9
6 изменённых файлов: 5 добавлений и 1084 удалений

Просмотреть файл

@ -45,7 +45,6 @@ class nsIPrincipal;
#ifdef MOZ_ENABLE_DBUS
# include "mozilla/WidgetUtilsGtk.h"
# include "GeoclueLocationProvider.h"
# include "PortalLocationProvider.h"
#endif
@ -495,24 +494,15 @@ nsresult nsGeolocationService::Init() {
#endif
#ifdef MOZ_WIDGET_GTK
# ifdef MOZ_GPSD
if (Preferences::GetBool("geo.provider.use_gpsd", false)) {
mProvider = new GpsdLocationProvider();
}
# endif
# ifdef MOZ_ENABLE_DBUS
if (!mProvider && widget::ShouldUsePortal(widget::PortalKind::Location)) {
mProvider = new PortalLocationProvider();
}
// Geoclue includes GPS data so it has higher priority than raw GPSD
if (!mProvider && StaticPrefs::geo_provider_use_geoclue()) {
nsCOMPtr<nsIGeolocationProvider> gcProvider = new GeoclueLocationProvider();
// The Startup() method will only succeed if Geoclue is available on D-Bus
if (NS_SUCCEEDED(gcProvider->Startup())) {
gcProvider->Shutdown();
mProvider = std::move(gcProvider);
}
}
# ifdef MOZ_GPSD
if (!mProvider && Preferences::GetBool("geo.provider.use_gpsd", false)) {
mProvider = new GpsdLocationProvider();
}
# endif
# endif
#endif

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,32 +0,0 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef GeoclueLocationProvider_h
#define GeoclueLocationProvider_h
#include "mozilla/RefPtr.h"
#include "nsIGeolocationProvider.h"
namespace mozilla::dom {
class GCLocProviderPriv;
class GeoclueLocationProvider final : public nsIGeolocationProvider {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIGEOLOCATIONPROVIDER
GeoclueLocationProvider();
private:
~GeoclueLocationProvider() = default;
RefPtr<GCLocProviderPriv> mPriv;
};
} // namespace mozilla::dom
#endif /* GeoclueLocationProvider_h */

Просмотреть файл

@ -15,7 +15,6 @@ if CONFIG["MOZ_GPSD"]:
if CONFIG["MOZ_ENABLE_DBUS"]:
SOURCES += ["GeoclueLocationProvider.cpp"]
SOURCES += ["PortalLocationProvider.cpp"]
LOCAL_INCLUDES += ["/dom/geolocation"]
CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]

Просмотреть файл

@ -5073,23 +5073,6 @@
value: 6000
mirror: always
#ifdef MOZ_ENABLE_DBUS
# Whether to use Geoclue location provider (if available on the system).
- name: geo.provider.use_geoclue
type: bool
value: false
mirror: always
# Whether to always provide high location accuracy, even if site
# doesn't actually request this level of accuracy.
# Almost no site correctly requests high accuracy so force it by default
# for compatibility with other geolocation providers.
- name: geo.provider.geoclue.always_high_accuracy
type: bool
value: true
mirror: always
#endif
#---------------------------------------------------------------------------
# Prefs starting with "gfx."
#---------------------------------------------------------------------------

Просмотреть файл

@ -9,7 +9,6 @@
// Allows to use RefPtr<T> with various kinds of GObjects
#include <gdk/gdk.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "mozilla/RefPtr.h"
@ -42,7 +41,6 @@ GOBJECT_TRAITS(GAppLaunchContext)
GOBJECT_TRAITS(GdkDragContext)
GOBJECT_TRAITS(GDBusMessage)
GOBJECT_TRAITS(GdkPixbuf)
GOBJECT_TRAITS(GCancellable)
#ifdef MOZ_ENABLE_DBUS
GOBJECT_TRAITS(DBusGProxy)