summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-04-03 12:34:04 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-04-05 15:14:59 +0000
commita5ced3ad19e2ada6a0ed5a48de21d2879ba2f333 (patch)
tree38081c0f605fcdfed63482b72c6c8a2a06d6beba /src/core/content_browser_client_qt.cpp
parent0aca80b0a29aa64536653a56aa87f626acc47189 (diff)
Use cookie-access rights for webcontent settings
This ties the indexed-db, DOM storage and filesystem access to cookie rights as they can all do the same cookies. A previous patch did the same for workers, but we were missing this class to complete the logic. Change-Id: I5ea894b6c631bcf25439759174866d260b91b71a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 3e620bd1f..60d7e3fdf 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -390,13 +390,12 @@ content::BrowserMainParts *ContentBrowserClientQt::CreateBrowserMainParts(const
void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost* host)
{
- // FIXME: Add a settings variable to enable/disable the file scheme.
const int id = host->GetID();
+ Profile *profile = Profile::FromBrowserContext(host->GetBrowserContext());
+ // FIXME: Add a settings variable to enable/disable the file scheme.
content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(id, url::kFileScheme);
static_cast<BrowserContextQt*>(host->GetBrowserContext())->m_adapter->userResourceController()->renderProcessStartedWithHost(host);
-#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
- host->AddFilter(new BrowserMessageFilterQt(id));
-#endif
+ host->AddFilter(new BrowserMessageFilterQt(id, profile));
#if defined(Q_OS_MACOS) && BUILDFLAG(ENABLE_SPELLCHECK) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
host->AddFilter(new SpellCheckMessageFilterPlatform(id));
#endif