Bug 1489844 - Port DOMPrefs to StaticPrefs - part 2 - dom.caches.enabled, r=ehsan

This commit is contained in:
Andrea Marchesini 2018-09-10 20:36:15 +02:00
Родитель 84efbc6ccd
Коммит d26d5425d9
6 изменённых файлов: 11 добавлений и 8 удалений

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

@ -19,7 +19,6 @@
// * This defines DOMPrefs::FooBar(JSContext* aCx, JSObject* aObj);
// This is allows the use of DOMPrefs in WebIDL files.
DOM_PREF(DOMCachesEnabled, "dom.caches.enabled")
DOM_PREF(DOMCachesTestingEnabled, "dom.caches.testing.enabled")
DOM_PREF(PerformanceLoggingEnabled, "dom.performance.enable_user_timing_logging")
DOM_PREF(NotificationEnabled, "dom.webnotifications.enabled")
@ -45,7 +44,7 @@ DOM_PREF(BinASTEncodingEnabled, "dom.script_loader.binast_encoding.enabled")
#endif
DOM_WEBIDL_PREF2(canvas_imagebitmap_extensions_enabled)
DOM_WEBIDL_PREF(DOMCachesEnabled)
DOM_WEBIDL_PREF2(dom_caches_enabled)
DOM_WEBIDL_PREF(NotificationEnabledInServiceWorkers)
DOM_WEBIDL_PREF(NotificationRIEnabled)
DOM_WEBIDL_PREF(ServiceWorkersEnabled)

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

@ -11,7 +11,7 @@
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache
[Exposed=(Window,Worker),
Func="mozilla::dom::DOMPrefs::DOMCachesEnabled"]
Func="mozilla::dom::DOMPrefs::dom_caches_enabled"]
interface Cache {
[NewObject]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);

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

@ -14,7 +14,7 @@ interface Principal;
[Exposed=(Window,Worker),
ChromeConstructor(CacheStorageNamespace namespace, Principal principal),
Func="mozilla::dom::DOMPrefs::DOMCachesEnabled"]
Func="mozilla::dom::DOMPrefs::dom_caches_enabled"]
interface CacheStorage {
[NewObject]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);

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

@ -62,7 +62,7 @@ partial interface WindowOrWorkerGlobalScope {
// https://w3c.github.io/ServiceWorker/#self-caches
partial interface WindowOrWorkerGlobalScope {
[Throws, Func="mozilla::dom::DOMPrefs::DOMCachesEnabled", SameObject]
[Throws, Func="mozilla::dom::DOMPrefs::dom_caches_enabled", SameObject]
readonly attribute CacheStorage caches;
};

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

@ -209,6 +209,13 @@ VARCACHE_PREF(
RelaxedAtomicBool, false
)
// SW Cache API
VARCACHE_PREF(
"dom.caches.enabled",
dom_caches_enabled,
RelaxedAtomicBool, true
)
//---------------------------------------------------------------------------
// Clear-Site-Data prefs
//---------------------------------------------------------------------------

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

@ -5614,9 +5614,6 @@ pref("identity.fxaccounts.auth.uri", "https://api.accounts.firefox.com/v1");
pref("beacon.enabled", true);
// SW Cache API
pref("dom.caches.enabled", true);
// UDPSocket API
pref("dom.udpsocket.enabled", false);