[headless] Ensure encryption key is set on Linux.
https://crrev.com/c/3343284 broke Chrome DevTools autoroller due to
subtle differences in OSCrypt::IsEncryptionAvailable() behavior on
Linux and Windows.
This change avoids the newly introduced condition in order to set
encryption key on Linux even if IsEncryptionAvailable() returns
negative.
Bug: 1284233
Change-Id: I052f5041704c4d42e691e40a6bab61bad51fb38e
Cq-Include-Trybots: luci.chromium.try:linux-headless-shell-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3366850
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Peter Kvitek <kvitekp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#955329}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
725681867e
commit
590e02c7b5
@ -68,8 +68,11 @@ void SetCryptKeyOnce(const base::FilePath& user_data_path) {
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && defined(HEADLESS_USE_PREFS)
|
||||
// The OSCrypt keys are process bound, so if network service is out of
|
||||
// process, send it the required key if it is available.
|
||||
if (content::IsOutOfProcessNetworkService() &&
|
||||
OSCrypt::IsEncryptionAvailable()) {
|
||||
if (content::IsOutOfProcessNetworkService()
|
||||
#if defined(OS_WIN)
|
||||
&& OSCrypt::IsEncryptionAvailable()
|
||||
#endif
|
||||
) {
|
||||
content::GetNetworkService()->SetEncryptionKey(
|
||||
OSCrypt::GetRawEncryptionKey());
|
||||
}
|
||||
|
Reference in New Issue
Block a user