diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-03 10:56:50 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2022-06-13 11:19:18 +0200 |
commit | f5207d2012efe408f178496b2023d822b33a6474 (patch) | |
tree | 229b06e1f869a1e92a00da64363aaf802f8aa9e2 | |
parent | 7b3570a96210d7f08453903be503eb33d43e495c (diff) |
Update Chromium
Submodule src/3rdparty 6559e00a3..88398c89a7b:
> Fix broken bundled zlib for cross compilation
> FIXUP: Fix url_utils for QtWebEngine
> Make sure we do not compile minizip from 3rdparty
> Trim down some dependencies of push messaging
Pick-to: 6.4
Change-Id: I3062f536fd144d00f72ea783ddcc56931a46a98f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/core/configure/BUILD.root.gn.in | 1 | ||||
-rw-r--r-- | src/core/profile_qt.cpp | 11 | ||||
-rw-r--r-- | src/core/profile_qt.h | 1 | ||||
-rw-r--r-- | tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 2 |
5 files changed, 14 insertions, 1 deletions
diff --git a/src/3rdparty b/src/3rdparty -Subproject 6559e00a366dac58b3467bd8475cc936baa1e5b +Subproject 88398c89a7b34606120ff919f873cb59ce3bcf2 diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in index a5a27e4f0..35fe32476 100644 --- a/src/core/configure/BUILD.root.gn.in +++ b/src/core/configure/BUILD.root.gn.in @@ -118,6 +118,7 @@ shared_library("QtWebEngineCore") { "//components/web_cache/browser", "//components/web_cache/renderer", "//components/spellcheck:buildflags", + "//components/profile_metrics", "//components/proxy_config", "//components/user_prefs", "//content/public/app", diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp index 829f96249..5bb54466c 100644 --- a/src/core/profile_qt.cpp +++ b/src/core/profile_qt.cpp @@ -69,6 +69,7 @@ #include "components/prefs/pref_service_factory.h" #include "components/prefs/pref_registry_simple.h" #include "components/user_prefs/user_prefs.h" +#include "components/profile_metrics/browser_profile_type.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "chrome/common/pref_names.h" #if QT_CONFIG(webengine_spellchecker) @@ -129,6 +130,11 @@ const PrefService* ProfileQt::GetPrefs() const return m_prefServiceAdapter.prefService(); } +bool ProfileQt::IsNewProfile() const +{ + return GetPrefs()->GetInitializationStatus() == PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE; +} + base::FilePath ProfileQt::GetPath() { return toFilePath(m_profileAdapter->dataPath()); @@ -248,6 +254,11 @@ content::FileSystemAccessPermissionContext *ProfileQt::GetFileSystemAccessPermis void ProfileQt::setupPrefService() { + profile_metrics::SetBrowserProfileType(this, + IsOffTheRecord() + ? profile_metrics::BrowserProfileType::kIncognito + : profile_metrics::BrowserProfileType::kRegular); + // Remove previous handler before we set a new one or we will assert // TODO: Remove in Qt6 if (m_prefServiceAdapter.prefService() != nullptr) { diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h index 9fb1e7f04..7c457c8ae 100644 --- a/src/core/profile_qt.h +++ b/src/core/profile_qt.h @@ -96,6 +96,7 @@ public: // Profile implementation: PrefService *GetPrefs() override; const PrefService *GetPrefs() const override; + bool IsNewProfile() const override; void Initialize(); ProfileAdapter *profileAdapter() { return m_profileAdapter; } diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index b8c0dd5f0..262e1ea8d 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -5028,7 +5028,7 @@ void tst_QWebEnginePage::isSafeRedirect_data() fileScheme += "/"; #endif - QString tempDir(fileScheme + QDir::tempPath()); + QString tempDir(fileScheme + QDir::tempPath() + "/"); QTest::newRow(qPrintable(tempDir)) << QUrl(tempDir) << QUrl(tempDir); QTest::newRow(qPrintable(tempDir + QString("/foo/bar"))) << QUrl(tempDir + "/foo/bar") << QUrl(tempDir + "/foo/bar"); QTest::newRow("filesystem:http://foo.com/bar") << QUrl("filesystem:http://foo.com/bar") << QUrl("filesystem:http://foo.com/bar/"); |