Partition Blink memory cache: remove duplicate code

This commit is contained in:
Carmelo Messina
2024-11-15 08:58:21 +01:00
parent cfd9bebbb5
commit a85e3018d5
@@ -23,8 +23,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../platform/loader/fetch/memory_cache.cc | 8 +--
.../platform/loader/fetch/memory_cache.h | 5 +-
.../platform/loader/fetch/resource_fetcher.cc | 51 +++++++++++++++----
.../platform/loader/fetch/resource_fetcher.h | 9 +++-
10 files changed, 65 insertions(+), 23 deletions(-)
.../platform/loader/fetch/resource_fetcher.h | 7 ++-
10 files changed, 63 insertions(+), 23 deletions(-)
diff --git a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc b/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc
--- a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc
@@ -243,7 +243,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
@@ -282,7 +282,14 @@ class PLATFORM_EXPORT ResourceFetcher
@@ -282,7 +282,12 @@ class PLATFORM_EXPORT ResourceFetcher
// `url` is used for finding a matching WebBundle.
// If `skip_service_worker` is true, the identifier won't be a ServiceWorker's
// identifier to keep the cache separated.
@@ -254,8 +254,6 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
+ scoped_refptr<const blink::SecurityOrigin> origin) const;
+ String GetCacheIdentifier(const KURL& url, bool skip_service_worker,
+ const String origin_url) const;
+
+ blink::mojom::ControllerServiceWorkerMode IsControlledByServiceWorker() const;
// If `url` exists as a resource in a subresource bundle in this frame,
// returns its UnguessableToken; otherwise, returns std::nullopt.