summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/profile_qt.cpp4
-rw-r--r--src/core/profile_qt.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp
index df05d891e..2387eba1b 100644
--- a/src/core/profile_qt.cpp
+++ b/src/core/profile_qt.cpp
@@ -194,7 +194,9 @@ content::BackgroundSyncController* ProfileQt::GetBackgroundSyncController()
content::BrowsingDataRemoverDelegate *ProfileQt::GetBrowsingDataRemoverDelegate()
{
- return new BrowsingDataRemoverDelegateQt();
+ if (!m_removerDelegate)
+ m_removerDelegate.reset(new BrowsingDataRemoverDelegateQt);
+ return m_removerDelegate.get();
}
content::PermissionControllerDelegate *ProfileQt::GetPermissionControllerDelegate()
diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h
index 00119c053..b25ea047b 100644
--- a/src/core/profile_qt.h
+++ b/src/core/profile_qt.h
@@ -55,6 +55,7 @@ class PrefService;
namespace QtWebEngineCore {
+class BrowsingDataRemoverDelegateQt;
class ProfileAdapter;
class PermissionManagerQt;
class SSLHostStateDelegateQt;
@@ -113,6 +114,7 @@ private:
friend class ContentBrowserClientQt;
friend class WebContentsAdapter;
scoped_refptr<net::URLRequestContextGetter> m_urlRequestContextGetter;
+ std::unique_ptr<BrowsingDataRemoverDelegateQt> m_removerDelegate;
std::unique_ptr<PermissionManagerQt> m_permissionManager;
std::unique_ptr<SSLHostStateDelegateQt> m_sslHostStateDelegate;
std::unique_ptr<PrefService> m_prefService;