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

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

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

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

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

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

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

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

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

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

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