From eccfa516c59780deba7fbf70fdd4e313b0000666 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 5 Mar 2021 15:08:38 -0800 Subject: [PATCH] refactor: CertVerifier is not in the network namespace anymore Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2689805 --- shell/browser/electron_browser_client.cc | 2 +- shell/browser/electron_browser_client.h | 2 +- shell/browser/net/network_context_service.cc | 2 +- shell/browser/net/network_context_service.h | 3 ++- shell/browser/net/system_network_context_manager.cc | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 7ae833bb084a..fd1f23405d47 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1068,7 +1068,7 @@ void ElectronBrowserClient::ConfigureNetworkContextParams( bool in_memory, const base::FilePath& relative_partition_path, network::mojom::NetworkContextParams* network_context_params, - network::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { + cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { DCHECK(browser_context); return NetworkContextServiceFactory::GetForContext(browser_context) ->ConfigureNetworkContextParams(network_context_params, diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index abda113521ee..f962e4cfd599 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -163,7 +163,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool in_memory, const base::FilePath& relative_partition_path, network::mojom::NetworkContextParams* network_context_params, - network::mojom::CertVerifierCreationParams* cert_verifier_creation_params) + cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) override; network::mojom::NetworkContext* GetSystemNetworkContext() override; content::MediaObserver* GetMediaObserver() override; diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index e7c8ea19500a..99649c6b41b8 100644 --- a/shell/browser/net/network_context_service.cc +++ b/shell/browser/net/network_context_service.cc @@ -26,7 +26,7 @@ NetworkContextService::~NetworkContextService() = default; void NetworkContextService::ConfigureNetworkContextParams( network::mojom::NetworkContextParams* network_context_params, - network::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { + cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params) { bool in_memory = browser_context_->IsOffTheRecord(); const base::FilePath& path = browser_context_->GetPath(); diff --git a/shell/browser/net/network_context_service.h b/shell/browser/net/network_context_service.h index be5e92b905c6..ef0c3fdebb74 100644 --- a/shell/browser/net/network_context_service.h +++ b/shell/browser/net/network_context_service.h @@ -9,6 +9,7 @@ #include "chrome/browser/net/proxy_config_monitor.h" #include "components/keyed_service/core/keyed_service.h" #include "mojo/public/cpp/bindings/remote.h" +#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h" #include "services/network/public/mojom/network_context.mojom.h" #include "shell/browser/electron_browser_context.h" @@ -26,7 +27,7 @@ class NetworkContextService : public KeyedService { void ConfigureNetworkContextParams( network::mojom::NetworkContextParams* network_context_params, - network::mojom::CertVerifierCreationParams* + cert_verifier::mojom::CertVerifierCreationParams* cert_verifier_creation_params); private: diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index f2454e27fa3a..7ca2308a8361 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -15,6 +15,7 @@ #include "content/public/common/content_features.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "net/net_buildflags.h" +#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h" #include "services/network/network_service.h" #include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h" #include "services/network/public/cpp/features.h" @@ -157,8 +158,8 @@ SystemNetworkContextManager::CreateDefaultNetworkContextParams() { ConfigureDefaultNetworkContextParams(network_context_params.get()); - network::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = - network::mojom::CertVerifierCreationParams::New(); + cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = + cert_verifier::mojom::CertVerifierCreationParams::New(); network_context_params->cert_verifier_params = content::GetCertVerifierParams(std::move(cert_verifier_creation_params)); return network_context_params;