summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/browser_context_qt.cpp')
-rw-r--r--src/core/browser_context_qt.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index ffee001ff..16b7e5514 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -57,7 +57,7 @@
#include "base/base_paths.h"
#include "components/prefs/pref_member.h"
#include "components/prefs/pref_service.h"
-#include "components/prefs/testing_pref_store.h"
+#include "components/prefs/in_memory_pref_store.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "components/prefs/pref_registry_simple.h"
@@ -72,9 +72,8 @@ namespace QtWebEngineCore {
BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
: m_adapter(adapter),
- m_prefStore(new TestingPrefStore())
+ m_prefStore(new InMemoryPrefStore())
{
- m_prefStore->SetInitializationCompleted();
PrefServiceFactory factory;
factory.set_user_prefs(m_prefStore);
scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple());
@@ -82,7 +81,7 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
#if BUILDFLAG(ENABLE_SPELLCHECK)
// Initial spellcheck settings
registry->RegisterStringPref(prefs::kAcceptLanguages, std::string());
- registry->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries, new base::ListValue());
+ registry->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries, base::MakeUnique<base::ListValue>());
registry->RegisterStringPref(spellcheck::prefs::kSpellCheckDictionary, std::string());
registry->RegisterBooleanPref(spellcheck::prefs::kEnableSpellcheck, false);
registry->RegisterBooleanPref(spellcheck::prefs::kSpellCheckUseSpellingService, false);
@@ -206,7 +205,7 @@ net::URLRequestContextGetter *BrowserContextQt::CreateRequestContextForStoragePa
}
#if BUILDFLAG(ENABLE_SPELLCHECK)
-void BrowserContextQt::failedToLoadDictionary(const std::string &language)
+void BrowserContextQt::FailedToLoadDictionary(const std::string &language)
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
qWarning() << "Could not load dictionary for:" << toQt(language) << endl
@@ -229,7 +228,7 @@ QStringList BrowserContextQt::spellCheckLanguages() const
QStringList spellcheck_dictionaries;
for (const auto &value : *m_prefService->GetList(spellcheck::prefs::kSpellCheckDictionaries)) {
std::string dictionary;
- if (value->GetAsString(&dictionary))
+ if (value.GetAsString(&dictionary))
spellcheck_dictionaries.append(QString::fromStdString(dictionary));
}