chromium/extensions/common/manifest_handlers/web_file_handlers_info.cc

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

#include "extensions/common/manifest_handlers/web_file_handlers_info.h"

#include <string_view>

#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "build/chromeos_buildflags.h"
#include "extensions/common/api/file_handlers.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/install_warning.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"

namespace extensions {

namespace {

FileHandlersManifestKeys;

bool IsInAllowlist(const Extension& extension) {}

// Verifies manifest input. Disambiguates `file_extensions` on `accept` into a
// list, which could otherwise have also been a string. `icon.sizes` remains as
// is because the generated data type only accepts a string. This string can be
// parsed with a method that gets a list of sizes.
// TODO(crbug.com/40169582): Re-use Blink parser.
std::unique_ptr<WebFileHandlers> ParseFromList(const Extension& extension,
                                               std::u16string* error) {}

}  // namespace

WebFileHandlers::WebFileHandlers() = default;
WebFileHandlers::~WebFileHandlers() = default;

// static
bool WebFileHandlers::HasFileHandlers(const Extension& extension) {}

// static
const WebFileHandlersInfo* WebFileHandlers::GetFileHandlers(
    const Extension& extension) {}

WebFileHandlersParser::WebFileHandlersParser() = default;
WebFileHandlersParser::~WebFileHandlersParser() = default;

bool WebFileHandlersParser::Parse(Extension* extension, std::u16string* error) {}

base::span<const char* const> WebFileHandlersParser::Keys() const {}

bool WebFileHandlersParser::Validate(
    const Extension* extension,
    std::string* error,
    std::vector<InstallWarning>* warnings) const {}

// static
bool WebFileHandlers::SupportsWebFileHandlers(const Extension& extension) {}

// static
bool WebFileHandlers::CanBypassPermissionDialog(const Extension& extension) {}

}  // namespace extensions