From 5bf0846938574020ab6684a471560c5f15009593 Mon Sep 17 00:00:00 2001
From: Szabolcs David <davidsz@inf.u-szeged.hu>
Date: Tue, 4 Apr 2017 01:55:44 -0700
Subject: [PATCH] Install filesystem: protocol handler
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

File creation with FileSystem API is supported, but these files were
not accessible through their filesystem: URLs.

Change-Id: Ic45a8ad766917947a70eb0079d37490576ea5d22
Task-number: QTBUG-56531
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 src/core/url_request_context_getter_qt.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 6422a0228..e6314039a 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -537,13 +537,16 @@ void URLRequestContextGetterQt::generateJobFactory()
     std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
 
     {
-        // Chromium has transferred a few protocol handlers to us, only pick blob: and chrome: and ignore the rest.
+        // Chromium has transferred a few protocol handlers to us, only pick blob:, chrome: and filesystem:.
         content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
         Q_ASSERT(it != m_protocolHandlers.end());
         jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
         it = m_protocolHandlers.find(content::kChromeUIScheme);
         Q_ASSERT(it != m_protocolHandlers.end());
         jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+        it = m_protocolHandlers.find(url::kFileSystemScheme);
+        Q_ASSERT(it != m_protocolHandlers.end());
+        jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
         m_protocolHandlers.clear();
     }
 
-- 
GitLab