chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc

// Copyright 2013 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/common/extensions/api/file_browser_handlers/file_browser_handler.h"

#include <stddef.h>

#include <memory>
#include <utility>

#include "base/check.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/extensions/extension_constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/install_warning.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handlers/permissions_parser.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/url_pattern.h"
#include "url/url_constants.h"

keys;
errors;

namespace {

const char kReadAccessString[] =;
const char kReadWriteAccessString[] =;
const char kCreateAccessString[] =;

unsigned int kPermissionsNotDefined =;
unsigned int kReadPermission =;
unsigned int kWritePermission =;
unsigned int kCreatePermission =;
unsigned int kInvalidPermission =;

unsigned int GetAccessPermissionFlagFromString(const std::string& access_str) {}

// Stored on the Extension.
struct FileBrowserHandlerInfo : public extensions::Extension::ManifestData {};

FileBrowserHandlerInfo::FileBrowserHandlerInfo() = default;

FileBrowserHandlerInfo::~FileBrowserHandlerInfo() = default;

}  // namespace

FileBrowserHandler::FileBrowserHandler()
    :{}

FileBrowserHandler::~FileBrowserHandler() = default;

void FileBrowserHandler::AddPattern(const URLPattern& pattern) {}

void FileBrowserHandler::ClearPatterns() {}

bool FileBrowserHandler::MatchesURL(const GURL& url) const {}

bool FileBrowserHandler::AddFileAccessPermission(
    const std::string& access) {}

bool FileBrowserHandler::ValidateFileAccessPermissions() {}

bool FileBrowserHandler::CanRead() const {}

bool FileBrowserHandler::CanWrite() const {}

bool FileBrowserHandler::HasCreateAccessPermission() const {}

// static
FileBrowserHandler::List*
FileBrowserHandler::GetHandlers(const extensions::Extension* extension) {}

// static
const FileBrowserHandler* FileBrowserHandler::FindForActionId(
    const extensions::Extension* extension,
    const std::string& action_id) {}

FileBrowserHandlerParser::FileBrowserHandlerParser() = default;

FileBrowserHandlerParser::~FileBrowserHandlerParser() = default;

namespace {

std::unique_ptr<FileBrowserHandler> LoadFileBrowserHandler(
    const std::string& extension_id,
    const base::Value::Dict* file_browser_handler,
    std::u16string* error) {}

// Loads FileBrowserHandlers from |extension_actions| into a list in |result|.
bool LoadFileBrowserHandlers(const std::string& extension_id,
                             const base::Value::List& extension_actions,
                             FileBrowserHandler::List* result,
                             std::u16string* error) {}

}  // namespace

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

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