chromium/chrome/browser/web_applications/isolated_web_apps/update_manifest/update_manifest_fetcher.cc

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

#include "chrome/browser/web_applications/isolated_web_apps/update_manifest/update_manifest_fetcher.h"

#include "base/functional/callback.h"
#include "base/json/json_reader.h"
#include "base/types/expected.h"
#include "chrome/browser/web_applications/isolated_web_apps/update_manifest/update_manifest.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "url/gurl.h"

namespace web_app {

namespace {

// We need to artificially limit the size of the update manifest, because it is
// loaded into memory.
// TODO(b/282633201): Document the limit.
constexpr size_t kMaxUpdateManifestLength =;

}  // namespace

UpdateManifestFetcher::UpdateManifestFetcher(
    GURL url,
    net::PartialNetworkTrafficAnnotationTag partial_traffic_annotation,
    scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
    :{}

UpdateManifestFetcher::~UpdateManifestFetcher() = default;

void UpdateManifestFetcher::FetchUpdateManifest(FetchCallback fetch_callback) {}

void UpdateManifestFetcher::DownloadUpdateManifest() {}

void UpdateManifestFetcher::OnUpdateManifestDownloaded(
    std::unique_ptr<std::string> update_manifest_content) {}

void UpdateManifestFetcher::ParseUpdateManifest(
    const std::string& update_manifest_content) {}

void UpdateManifestFetcher::InitializeJsonParser() {}

void UpdateManifestFetcher::OnUpdateManifestParsed(
    std::optional<base::Value> result,
    const std::optional<std::string>& error) {}

}  // namespace web_app