// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_RENDERER_HOST_CODE_CACHE_HOST_IMPL_H_ #define CONTENT_BROWSER_RENDERER_HOST_CODE_CACHE_HOST_IMPL_H_ #include <string> #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "build/build_config.h" #include "components/services/storage/public/mojom/cache_storage_control.mojom.h" #include "content/common/content_export.h" #include "mojo/public/cpp/base/big_buffer.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver_set.h" #include "mojo/public/cpp/bindings/unique_receiver_set.h" #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" #include "third_party/blink/public/mojom/loader/code_cache.mojom.h" class GURL; namespace content { class GeneratedCodeCache; class GeneratedCodeCacheContext; // The implementation of a CodeCacheHost, which stores and retrieves resource // metadata, either bytecode or native code, generated by a renderer process. // // This implements two independent caches: // // GeneratedCodeCache: // Entries are keyed by URL, cache type, and network isolation key. // See: - `DidGenerateCacheableMetadata` // - `FetchCachedCode` // - `ClearCodeCacheEntry` // // CacheStorage: // Entries are keyed by URL, cache name, and storage key. // This class only supports writing such data. Data is stored as // "side data" in the cache storage cache. // See: - `DidGenerateCacheableMetadataInCacheStorage` // - `CacheStorageCache::WriteSideData` // // This class is sequence-friendly and is not necessarily bound to a physical // thread. class CONTENT_EXPORT CodeCacheHostImpl : public blink::mojom::CodeCacheHost { … }; } // namespace content #endif // CONTENT_BROWSER_RENDERER_HOST_CODE_CACHE_HOST_IMPL_H_