chromium/third_party/blink/common/service_worker/service_worker_loader_helpers.cc

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

#include "third_party/blink/public/common/service_worker/service_worker_loader_helpers.h"

#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/feature_list.h"
#include "base/strings/stringprintf.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/http/http_util.h"
#include "net/url_request/redirect_info.h"
#include "net/url_request/redirect_util.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "services/network/public/mojom/fetch_api.mojom-shared.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/common/blob/blob_utils.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/loader/resource_type_util.h"
#include "ui/base/page_transition_types.h"

namespace blink {
namespace {

// Calls |callback| when Blob reading is complete.
class BlobCompleteCaller : public mojom::BlobReaderClient {};

void SaveResponseHeaders(const mojom::FetchAPIResponse& response,
                         network::mojom::URLResponseHead* out_head) {}

}  // namespace

// static
void ServiceWorkerLoaderHelpers::SaveResponseInfo(
    const mojom::FetchAPIResponse& response,
    network::mojom::URLResponseHead* out_head) {}

// static
std::optional<net::RedirectInfo>
ServiceWorkerLoaderHelpers::ComputeRedirectInfo(
    const network::ResourceRequest& original_request,
    const network::mojom::URLResponseHead& response_head) {}

int ServiceWorkerLoaderHelpers::ReadBlobResponseBody(
    mojo::Remote<mojom::Blob>* blob,
    uint64_t blob_size,
    base::OnceCallback<void(int)> on_blob_read_complete,
    mojo::ScopedDataPipeConsumerHandle* handle_out) {}

// static
bool ServiceWorkerLoaderHelpers::IsMainRequestDestination(
    network::mojom::RequestDestination destination) {}

// static
const char* ServiceWorkerLoaderHelpers::FetchResponseSourceToSuffix(
    network::mojom::FetchResponseSource source) {}

}  // namespace blink