зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1489844 - Port DOMPrefs to StaticPrefs - part 16 - dom.netinfo.enabled, r=ehsan
This commit is contained in:
Родитель
c47168b4b7
Коммит
82b6a8da30
|
@ -19,7 +19,6 @@
|
|||
// * This defines DOMPrefs::FooBar(JSContext* aCx, JSObject* aObj);
|
||||
// This is allows the use of DOMPrefs in WebIDL files.
|
||||
|
||||
DOM_PREF(NetworkInformationEnabled, "dom.netinfo.enabled")
|
||||
DOM_PREF(FetchObserverEnabled, "dom.fetchObserver.enabled")
|
||||
DOM_PREF(ResistFingerprintingEnabled, "privacy.resistFingerprinting")
|
||||
DOM_PREF(EnableAutoDeclineCanvasPrompts, "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts")
|
||||
|
@ -41,7 +40,7 @@ DOM_WEBIDL_PREF2(dom_push_enabled)
|
|||
DOM_WEBIDL_PREF2(dom_streams_enabled)
|
||||
DOM_WEBIDL_PREF2(gfx_offscreencanvas_enabled)
|
||||
DOM_WEBIDL_PREF2(dom_webkitBlink_dirPicker_enabled)
|
||||
DOM_WEBIDL_PREF(NetworkInformationEnabled)
|
||||
DOM_WEBIDL_PREF2(dom_netinfo_enabled)
|
||||
DOM_WEBIDL_PREF(FetchObserverEnabled)
|
||||
DOM_WEBIDL_PREF(PerformanceObserverEnabled)
|
||||
DOM_WEBIDL_PREF(SchedulerTimingEnabled)
|
||||
|
|
|
@ -18,7 +18,7 @@ enum ConnectionType {
|
|||
"unknown"
|
||||
};
|
||||
|
||||
[Func="mozilla::dom::DOMPrefs::NetworkInformationEnabled",
|
||||
[Func="mozilla::dom::DOMPrefs::dom_netinfo_enabled",
|
||||
Exposed=(Window,Worker)]
|
||||
interface NetworkInformation : EventTarget {
|
||||
readonly attribute ConnectionType type;
|
||||
|
|
|
@ -16,7 +16,7 @@ WorkerNavigator implements NavigatorStorage;
|
|||
// http://wicg.github.io/netinfo/#extensions-to-the-navigator-interface
|
||||
[Exposed=Worker]
|
||||
partial interface WorkerNavigator {
|
||||
[Func="mozilla::dom::DOMPrefs::NetworkInformationEnabled", Throws]
|
||||
[Func="mozilla::dom::DOMPrefs::dom_netinfo_enabled", Throws]
|
||||
readonly attribute NetworkInformation connection;
|
||||
};
|
||||
|
||||
|
|
|
@ -313,6 +313,19 @@ VARCACHE_PREF(
|
|||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
// Network Information API
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
# define PREF_VALUE true
|
||||
#else
|
||||
# define PREF_VALUE false
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"dom.netinfo.enabled",
|
||||
dom_netinfo_enabled,
|
||||
RelaxedAtomicBool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Clear-Site-Data prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -5181,13 +5181,6 @@ pref("media.ondevicechange.fakeDeviceChangeEvent.enabled", false);
|
|||
// a no-op.
|
||||
pref("layout.css.touch_action.enabled", true);
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// Network Information API
|
||||
pref("dom.netinfo.enabled", true);
|
||||
#else
|
||||
pref("dom.netinfo.enabled", false);
|
||||
#endif
|
||||
|
||||
// How long must we wait before declaring that a window is a "ghost" (i.e., a
|
||||
// likely leak)? This should be longer than it usually takes for an eligible
|
||||
// window to be collected via the GC/CC.
|
||||
|
|
Загрузка…
Ссылка в новой задаче