summaryrefslogtreecommitdiffstats
path: root/src/core/net
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-09-21 13:28:54 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2023-12-09 19:53:11 +0100
commit94d3aa19ff444007de9cf656d32f6c7e8f7b1872 (patch)
tree657279e24e840fc57ade0e13f67aa2a234c7f3c7 /src/core/net
parent5b7348aacee8688dda4d99011130754a9bf4678c (diff)
Chromium 116 adaptations
Change-Id: Ie297e6ddef21cda8d71ef3daeaa4bcb82e806911 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/net')
-rw-r--r--src/core/net/plugin_response_interceptor_url_loader_throttle.cpp6
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.cpp10
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.h1
-rw-r--r--src/core/net/system_network_context_manager.cpp4
4 files changed, 16 insertions, 5 deletions
diff --git a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
index fb7656392..5994f083d 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
@@ -9,7 +9,7 @@
#include "plugin_response_interceptor_url_loader_throttle.h"
#include "base/functional/bind.h"
-#include "base/guid.h"
+#include "base/uuid.h"
#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -120,7 +120,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL
MimeTypesHandler::ReportUsedHandler(extension_id);
- std::string view_id = base::GenerateGUID();
+ std::string view_id = base::Uuid::GenerateRandomV4().AsLowercaseString();
// The string passed down to the original client with the response body.
std::string payload = view_id;
@@ -173,7 +173,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL
auto transferrable_loader = blink::mojom::TransferrableURLLoader::New();
transferrable_loader->url = GURL(
extensions::Extension::GetBaseURLFromExtensionId(extension_id).spec() +
- base::GenerateGUID());
+ base::Uuid::GenerateRandomV4().AsLowercaseString());
transferrable_loader->url_loader = std::move(original_loader);
transferrable_loader->url_loader_client = std::move(original_client);
transferrable_loader->head = std::move(deep_copied_response);
diff --git a/src/core/net/ssl_host_state_delegate_qt.cpp b/src/core/net/ssl_host_state_delegate_qt.cpp
index dcb881a49..41967f14e 100644
--- a/src/core/net/ssl_host_state_delegate_qt.cpp
+++ b/src/core/net/ssl_host_state_delegate_qt.cpp
@@ -111,6 +111,16 @@ bool SSLHostStateDelegateQt::HasAllowException(const std::string &host, content:
policy_iterator->second.HasAllowException();
}
+bool SSLHostStateDelegateQt::HasAllowExceptionForAnyHost(content::StoragePartition *storage_partition)
+{
+ for (auto const &it : m_certPolicyforHost) {
+ if (it.second.HasAllowException()) {
+ return true;
+ }
+ }
+ return false;
+}
+
void SSLHostStateDelegateQt::SetHttpsEnforcementForHost(const std::string &host, bool enforce,
content::StoragePartition *storage_partition)
{
diff --git a/src/core/net/ssl_host_state_delegate_qt.h b/src/core/net/ssl_host_state_delegate_qt.h
index ab415603f..0b3d7974c 100644
--- a/src/core/net/ssl_host_state_delegate_qt.h
+++ b/src/core/net/ssl_host_state_delegate_qt.h
@@ -43,6 +43,7 @@ public:
bool IsHttpsEnforcedForHost(const std::string &host, content::StoragePartition *web_contents) override;
void RevokeUserAllowExceptions(const std::string &host) override;
bool HasAllowException(const std::string &host, content::StoragePartition *web_contents) override;
+ bool HasAllowExceptionForAnyHost(content::StoragePartition *storage_partition) override;
private:
std::map<std::string, CertPolicy> m_certPolicyforHost;
diff --git a/src/core/net/system_network_context_manager.cpp b/src/core/net/system_network_context_manager.cpp
index 65b5d9c97..935bf6b28 100644
--- a/src/core/net/system_network_context_manager.cpp
+++ b/src/core/net/system_network_context_manager.cpp
@@ -34,8 +34,8 @@
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/net/chrome_mojo_proxy_resolver_win.h"
-#include "components/os_crypt/os_crypt.h"
-#include "content/public/common/network_service_util.h"
+#include "components/os_crypt/sync/os_crypt.h"
+#include "content/public/browser/network_service_util.h"
#endif
namespace {