diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-07 11:35:08 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-23 00:24:54 +0000 |
commit | ce6a1a74d16deecf0c150aa1f5bae2cc6a95e7b1 (patch) | |
tree | e1ce3f92b50c0c0e5140019134e70e70a1ddb88d /src/core/profile_qt.cpp | |
parent | 5c6201f6c393967e9284bb9841281d286126541d (diff) |
Adaptations for Chromium 73
Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/profile_qt.cpp')
-rw-r--r-- | src/core/profile_qt.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp index 39500629a..14a39de49 100644 --- a/src/core/profile_qt.cpp +++ b/src/core/profile_qt.cpp @@ -53,6 +53,7 @@ #include "base/time/time.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/shared_cors_origin_access_list.h" #include "content/public/browser/storage_partition.h" #include "base/base_paths.h" @@ -84,8 +85,9 @@ namespace QtWebEngineCore { ProfileQt::ProfileQt(ProfileAdapter *profileAdapter) - : m_profileIOData(new ProfileIODataQt(this)), - m_profileAdapter(profileAdapter) + : m_sharedCorsOriginAccessList(content::SharedCorsOriginAccessList::Create()) + , m_profileIOData(new ProfileIODataQt(this)) + , m_profileAdapter(profileAdapter) #if BUILDFLAG(ENABLE_EXTENSIONS) , m_extensionSystem(nullptr) #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -116,8 +118,6 @@ ProfileQt::ProfileQt(ProfileAdapter *profileAdapter) registry->RegisterDictionaryPref(extensions::pref_names::kInstallLoginScreenAppList); registry->RegisterListPref(extensions::pref_names::kAllowedTypes); registry->RegisterBooleanPref(extensions::pref_names::kStorageGarbageCollect, false); - registry->RegisterInt64Pref(extensions::pref_names::kLastUpdateCheck, 0); - registry->RegisterInt64Pref(extensions::pref_names::kNextUpdateCheck, 0); registry->RegisterListPref(extensions::pref_names::kAllowedInstallSites); registry->RegisterStringPref(extensions::pref_names::kLastChromeVersion, std::string()); registry->RegisterListPref(extensions::pref_names::kNativeMessagingBlacklist); @@ -283,6 +283,27 @@ net::URLRequestContextGetter *ProfileQt::CreateRequestContextForStoragePartition return nullptr; } +content::ClientHintsControllerDelegate *ProfileQt::GetClientHintsControllerDelegate() +{ + return nullptr; +} + +void ProfileQt::SetCorsOriginAccessListForOrigin(const url::Origin &source_origin, + std::vector<network::mojom::CorsOriginPatternPtr> allow_patterns, + std::vector<network::mojom::CorsOriginPatternPtr> block_patterns, + base::OnceClosure closure) +{ + m_sharedCorsOriginAccessList->SetForOrigin(source_origin, + std::move(allow_patterns), + std::move(block_patterns), + std::move(closure)); +} + +const content::SharedCorsOriginAccessList *ProfileQt::GetSharedCorsOriginAccessList() const +{ + return m_sharedCorsOriginAccessList.get(); +} + #if QT_CONFIG(webengine_spellchecker) void ProfileQt::FailedToLoadDictionary(const std::string &language) { |