diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-28 14:41:10 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-29 08:58:36 +0000 |
commit | d878f684916cef110d8e4474eac3658e47f63e9e (patch) | |
tree | 49aa2d253c55345db821a9dc15ec954afbae9e0e | |
parent | be36115f03e8e70abe88c890ad6642e1b909da1d (diff) | |
download | qtwebengine-chromium-d878f684916cef110d8e4474eac3658e47f63e9e.tar.gz |
Fix browser DCHECK
Do not rely on sandboxed state for whether current process is browser.
Task-number: QTBUG-108904
Change-Id: Id59d25307c5ba4c05c4b1fe7fd4e93da492045ed
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/445692
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | chromium/content/common/pseudonymization_salt.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chromium/content/common/pseudonymization_salt.cc b/chromium/content/common/pseudonymization_salt.cc index 28e003bef91..d1b30bc544a 100644 --- a/chromium/content/common/pseudonymization_salt.cc +++ b/chromium/content/common/pseudonymization_salt.cc @@ -11,7 +11,8 @@ #include "base/rand_util.h" #if DCHECK_IS_ON() -#include "sandbox/policy/sandbox.h" +#include "base/command_line.h" +#include "sandbox/policy/switches.h" #endif namespace content { @@ -43,9 +44,9 @@ uint32_t GetPseudonymizationSalt() { if (salt == 0) { #if DCHECK_IS_ON() // Only the Browser process needs to initialize the `salt` on demand. - // Other processes (identified via the IsProcessSandboxed heuristic) should + // Other processes (identified via the process-type arg) should // receive the salt from their parent processes. - DCHECK(!sandbox::policy::Sandbox::IsProcessSandboxed()); + DCHECK(!command_line.HasSwitch(switches::kProcessType)); #endif salt = InitializeSalt(); } |