Repository navigation
fix: provide paths for all NetworkContextFilePaths keys - #31777
Conversation
| path.Append(chrome::kNetworkDataDirname); | ||
| network_context_params->file_paths->unsandboxed_data_path = path; | ||
| network_context_params->file_paths->trigger_migration = | ||
| features::ShouldTriggerNetworkDataMigration(); |
There was a problem hiding this comment.
Might need to include chrome/browser/browser_features.h
There was a problem hiding this comment.
Oops forgot that we don't build the entire //chrome/browser target as part of https://github.com/electron/electron/blob/main/chromium_src/BUILD.gn#L13. Will need to add //chrome/browser/browser_features.h, //chrome/browser/browser_features.cc to address ci failure.
|
|
|
@deepak1556 My plan was to pick it up when Chrome flipped it to |
zcbenz
left a comment
There was a problem hiding this comment.
The Windows code calls SystemNetworkContextManager::IsNetworkSandboxEnabled() which is implemented in chrome/browser/net/system_network_context_manager.cc, I don't think we can simply include that file to build since it seems to have lots of dependencies.
lld-link: error: undefined symbol: public: static bool __cdecl SystemNetworkContextManager::IsNetworkSandboxEnabled(void)
>>> referenced by .\..\..\chrome\browser\browser_features.cc:99
As a workaround you can probably just define it somewhere in Electron.
#if defined(OS_WIN)
bool SystemNetworkContextManager::IsNetworkSandboxEnabled() {
auto* local_state = g_browser_process->local_state();
if (local_state &&
local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) {
return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled);
}
return sandbox::policy::features::IsNetworkSandboxEnabled();
}
#endif|
We maintain a synonymous version of But this one would be a special case, as we are building Another way would be declare |
ckerr
left a comment
There was a problem hiding this comment.
I'm just here to provide that critically-needed fifth approval
CI will be fixed, don't want to leave this blocked
|
@VerteDinde has manually backported this PR to "16-x-y", please check out #31852 |
|
Release Notes Persisted
|
|
I was unable to backport this PR to "16-x-y" cleanly; |
* fix: provide paths for all NetworkContextFilePaths keys * chore: include chrome features header * chore: build browser_features * yolo * add pref service * fix: include sandbox policy features * fix pref key * fix: gate pref key to OS_WIN Co-authored-by: VerteDinde <[email protected]>
Chromium is currently migrating file paths for the network service to a different path, as such a bunch of path calculations were moved into a config struct that we weren't fully populating.
This populates the struct identically to
//chrome.Refs: https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/network_context.mojom;l=219;drc=b6e40f8ab247ea209bcecff994386a70a4169e9d
Refs: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/net/profile_network_context_service.cc;l=712;drc=b6e40f8ab247ea209bcecff994386a70a4169e9d;bpv=1;bpt=1
Notes:
~/.config/{App Name}will no longer be incorrectly deleted if it is a symlink on unix systems