diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-11 09:05:49 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-04-11 15:33:49 +0000 |
commit | 22a550303618202135e58f5673e7b8935d578687 (patch) | |
tree | 560918164edd7b76a2a8b6246f6dbca0ee69cf9a /src/core/browser_context_adapter.cpp | |
parent | f8ed4ca51333157170f0fc94e2deff0d91cf4833 (diff) | |
parent | 7978feadee937299798372bced1680f52b4b1842 (diff) |
Merge "Merge branch '5.6' into 5.7" into refs/staging/5.7v5.7.0-beta1
Diffstat (limited to 'src/core/browser_context_adapter.cpp')
-rw-r--r-- | src/core/browser_context_adapter.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp index 19280cf10..9980bf110 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(',')); |