fix: provide paths for all NetworkContextFilePaths keys (#31777)

* 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 <khammond@slack-corp.com>
This commit is contained in:
Samuel Attard 2021-11-16 12:26:09 +13:00 committed by GitHub
parent 65e4f75058
commit 246884c4fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 59 additions and 1 deletions

View file

@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/net/proxy_config_monitor.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "sandbox/policy/features.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/network_service.mojom.h"
@ -49,6 +50,13 @@ class SystemNetworkContextManager {
// Destroys the global SystemNetworkContextManager instance.
static void DeleteInstance();
// c.f.
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/net/system_network_context_manager.cc;l=730-740;drc=15a616c8043551a7cb22c4f73a88e83afb94631c;bpv=1;bpt=1
// Returns whether the network sandbox is enabled. This depends on policy but
// also feature status from sandbox. Called before there is an instance of
// SystemNetworkContextManager.
static bool IsNetworkSandboxEnabled();
// Configures default set of parameters for configuring the network context.
void ConfigureDefaultNetworkContextParams(
network::mojom::NetworkContextParams* network_context_params);