chromium/third_party/blink/renderer/platform/loader/fetch/url_loader/cached_metadata_handler.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_URL_LOADER_CACHED_METADATA_HANDLER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_URL_LOADER_CACHED_METADATA_HANDLER_H_

#include <stdint.h>

#include "base/containers/span.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/loader/code_cache.mojom-blink-forward.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"

namespace base {
class Time;
}

namespace blink {

class CachedMetadata;
class CodeCacheHost;
class ParkableString;
class ResourceResponse;
class WebProcessMemoryDump;

// A callback for sending the serialized data of cached metadata to the
// persistent storage.
// TODO(pasko): rename this class to CachedMetadataPersister.
class PLATFORM_EXPORT CachedMetadataSender {};

PLATFORM_EXPORT bool ShouldUseIsolatedCodeCache(
    mojom::blink::RequestContextType,
    const ResourceResponse&);

// Handler class for caching operations.
class CachedMetadataHandler : public GarbageCollected<CachedMetadataHandler> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_URL_LOADER_CACHED_METADATA_HANDLER_H_