diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-02-13 14:53:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-11 11:13:32 +0100 |
commit | 5d9b86dff687621cad7cd1a9075d35fc49ed96e1 (patch) | |
tree | 32d1088b404df2435e79177109057054ee2aedb0 /src/core/pref_service_adapter.cpp | |
parent | c869d56cbafc6ae9b6ebadbc398519c38331a13c (diff) |
Update chromium + simplify snapshot
Simplifies our snapshoting and includes among other
files the chrome command-line preference store, which
we can use with minor adaptations.
Submodule src/3rdparty 07787da4..4ea22135:
> Fix build for expanded sources
> Merge "Merge remote-tracking branch 'origin/upstream-master' into 79-based" into 79-based
> Don't trigger quad blending for opacity
> FIXUP: Fix build with gcc 5
> [Backport] Allow restricted clock_nanosleep in Linux sandbox
Change-Id: Ibdf7b24c0fbe920edd61f550913dca02ed67cd20
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/pref_service_adapter.cpp')
-rw-r--r-- | src/core/pref_service_adapter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/pref_service_adapter.cpp b/src/core/pref_service_adapter.cpp index a1ac5e912..4ded70d07 100644 --- a/src/core/pref_service_adapter.cpp +++ b/src/core/pref_service_adapter.cpp @@ -39,12 +39,13 @@ #include "pref_service_adapter.h" -#include "command_line_pref_store_qt.h" #include "profile_adapter.h" #include "type_conversion.h" #include "web_engine_context.h" +#include "chrome/browser/prefs/chrome_command_line_pref_store.h" #include "content/public/browser/browser_thread.h" +#include "components/language/core/browser/pref_names.h" #include "components/prefs/pref_member.h" #include "components/prefs/in_memory_pref_store.h" #include "components/prefs/json_pref_store.h" @@ -80,7 +81,7 @@ void PrefServiceAdapter::setup(const ProfileAdapter &profileAdapter) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); PrefServiceFactory factory; - factory.set_command_line_prefs(base::MakeRefCounted<CommandLinePrefStoreQt>( + factory.set_command_line_prefs(base::MakeRefCounted<ChromeCommandLinePrefStore>( WebEngineContext::commandLine())); QString userPrefStorePath = profileAdapter.dataPath(); @@ -92,12 +93,12 @@ void PrefServiceAdapter::setup(const ProfileAdapter &profileAdapter) factory.set_user_prefs(base::MakeRefCounted<JsonPrefStore>(toFilePath(userPrefStorePath))); } - PrefRegistrySimple *registry = new PrefRegistrySimple(); - PrefProxyConfigTrackerImpl::RegisterPrefs(registry); + auto registry = base::MakeRefCounted<PrefRegistrySimple>(); + PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); #if QT_CONFIG(webengine_spellchecker) // Initial spellcheck settings - registry->RegisterStringPref(prefs::kAcceptLanguages, std::string()); + registry->RegisterStringPref(language::prefs::kAcceptLanguages, std::string()); registry->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries); registry->RegisterListPref(spellcheck::prefs::kSpellCheckForcedDictionaries); registry->RegisterListPref(spellcheck::prefs::kSpellCheckBlacklistedDictionaries); |