diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-03 10:56:50 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-13 16:09:31 +0000 |
commit | f13ae31ea24d2766f57990e5c143c2088fc87065 (patch) | |
tree | d44c9ef714c34baf3c255496b3e20bac0ec4d9bb /src | |
parent | b04bab528b835581cb9a5fda51863e2457ada63f (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
Change-Id: I3062f536fd144d00f72ea783ddcc56931a46a98f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit f5207d2012efe408f178496b2023d822b33a6474)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
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 |
4 files changed, 13 insertions, 0 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; } |