Check IDB quota usage through QuotaManager
[WebKit-https.git] / Source / WebKit / NetworkProcess / NetworkProcessPlatformStrategies.cpp
index e6d679f..f234e29 100644 (file)
 #include "config.h"
 #include "NetworkProcessPlatformStrategies.h"
 
-#include <WebCore/BlobRegistryImpl.h>
+#include <WebCore/BlobRegistry.h>
 #include <wtf/NeverDestroyed.h>
 
-using namespace WebCore;
-
 namespace WebKit {
+using namespace WebCore;
 
 void NetworkProcessPlatformStrategies::initialize()
 {
@@ -39,11 +38,6 @@ void NetworkProcessPlatformStrategies::initialize()
     setPlatformStrategies(&platformStrategies.get());
 }
 
-CookiesStrategy* NetworkProcessPlatformStrategies::createCookiesStrategy()
-{
-    return nullptr;
-}
-
 LoaderStrategy* NetworkProcessPlatformStrategies::createLoaderStrategy()
 {
     return nullptr;
@@ -56,7 +50,20 @@ PasteboardStrategy* NetworkProcessPlatformStrategies::createPasteboardStrategy()
 
 BlobRegistry* NetworkProcessPlatformStrategies::createBlobRegistry()
 {
-    return new BlobRegistryImpl;
+    using namespace WebCore;
+    class EmptyBlobRegistry : public WebCore::BlobRegistry {
+        void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURL(const URL&, const URL& srcURL) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) final { ASSERT_NOT_REACHED(); }
+        void unregisterBlobURL(const URL&) final { ASSERT_NOT_REACHED(); }
+        unsigned long long blobSize(const URL&) final { ASSERT_NOT_REACHED(); return 0; }
+        void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final { ASSERT_NOT_REACHED(); }
+        bool isBlobRegistryImpl() const { return false; }
+    };
+    static NeverDestroyed<EmptyBlobRegistry> blobRegistry;
+    return &blobRegistry.get();
 }
 
 }