From f5207d2012efe408f178496b2023d822b33a6474 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 3 Jun 2022 10:56:50 +0200 Subject: 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 --- src/3rdparty | 2 +- src/core/configure/BUILD.root.gn.in | 1 + src/core/profile_qt.cpp | 11 +++++++++++ src/core/profile_qt.h | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty b/src/3rdparty index 6559e00a3..88398c89a 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 6559e00a366dac58b3467bd8475cc936baa1e5b1 +Subproject commit 88398c89a7b34606120ff919f873cb59ce3bcf2f 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; } -- cgit v1.2.1