summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/browser_context_adapter.cpp')
-rw-r--r--src/core/browser_context_adapter.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 19280cf1..9980bf11 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -224,8 +224,13 @@ QString BrowserContextAdapter::cookiesPath() const
if (m_offTheRecord)
return QString();
QString basePath = dataPath();
- if (!basePath.isEmpty())
- return basePath % QLatin1String("/Coookies");
+ if (!basePath.isEmpty()) {
+ // This is a typo fix. We still need the old path in order to avoid breaking migration.
+ QDir coookiesFolder(basePath % QLatin1String("/Coookies"));
+ if (coookiesFolder.exists())
+ return coookiesFolder.path();
+ return basePath % QLatin1String("/Cookies");
+ }
return QString();
}
@@ -403,6 +408,11 @@ void BrowserContextAdapter::permissionRequestReply(const QUrl &origin, Permissio
static_cast<PermissionManagerQt*>(browserContext()->GetPermissionManager())->permissionRequestReply(origin, type, reply);
}
+bool BrowserContextAdapter::checkPermission(const QUrl &origin, PermissionType type)
+{
+ return static_cast<PermissionManagerQt*>(browserContext()->GetPermissionManager())->checkPermission(origin, type);
+}
+
QString BrowserContextAdapter::httpAcceptLanguageWithoutQualities() const
{
const QStringList list = m_httpAcceptLanguage.split(QLatin1Char(','));