chromium/storage/browser/file_system/external_mount_points.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 "storage/browser/file_system/external_mount_points.h"

#include <memory>
#include <utility>

#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/strings/strcat.h"
#include "build/chromeos_buildflags.h"
#include "storage/browser/file_system/file_system_url.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"

class GURL;

namespace storage {

namespace {

// Normalizes file path so it has normalized separators and ends with exactly
// one separator. Paths have to be normalized this way for use in
// GetVirtualPath method. Separators cannot be completely stripped, or
// GetVirtualPath could not working in some edge cases.
// For example, /a/b/c(1)/d would be erroneously resolved as c/d if the
// following mount points were registered: "/a/b/c", "/a/b/c(1)". (Note:
// "/a/b/c" < "/a/b/c(1)" < "/a/b/c/").
base::FilePath NormalizeFilePath(const base::FilePath& path) {}

bool IsOverlappingMountPathForbidden(FileSystemType type) {}

// Wrapper around ref-counted ExternalMountPoints that will be used to lazily
// create and initialize LazyInstance system ExternalMountPoints.
class SystemMountPointsLazyWrapper {};

base::LazyInstance<SystemMountPointsLazyWrapper>::Leaky
    g_external_mount_points =;

}  // namespace

class ExternalMountPoints::Instance {};

//--------------------------------------------------------------------------

// static
ExternalMountPoints* ExternalMountPoints::GetSystemInstance() {}

// static
scoped_refptr<ExternalMountPoints> ExternalMountPoints::CreateRefCounted() {}

// static
void ExternalMountPoints::GetDebugJSONForKey(
    std::string_view key,
    base::OnceCallback<void(std::pair<std::string_view, base::Value>)>
        callback) {}

bool ExternalMountPoints::RegisterFileSystem(
    const std::string& mount_name,
    FileSystemType type,
    const FileSystemMountOption& mount_option,
    const base::FilePath& path_in) {}

bool ExternalMountPoints::HandlesFileSystemMountType(
    FileSystemType type) const {}

bool ExternalMountPoints::RevokeFileSystem(const std::string& mount_name) {}

bool ExternalMountPoints::GetRegisteredPath(const std::string& filesystem_id,
                                            base::FilePath* path) const {}

bool ExternalMountPoints::CrackVirtualPath(
    const base::FilePath& virtual_path,
    std::string* mount_name,
    FileSystemType* type,
    std::string* cracked_id,
    base::FilePath* path,
    FileSystemMountOption* mount_option) const {}

FileSystemURL ExternalMountPoints::CrackURL(
    const GURL& url,
    const blink::StorageKey& storage_key) const {}

FileSystemURL ExternalMountPoints::CreateCrackedFileSystemURL(
    const blink::StorageKey& storage_key,
    FileSystemType type,
    const base::FilePath& virtual_path) const {}

void ExternalMountPoints::AddMountPointInfosTo(
    std::vector<MountPointInfo>* mount_points) const {}

bool ExternalMountPoints::GetVirtualPath(const base::FilePath& path_in,
                                         base::FilePath* virtual_path) const {}

base::FilePath ExternalMountPoints::CreateVirtualRootPath(
    const std::string& mount_name) const {}

FileSystemURL ExternalMountPoints::CreateExternalFileSystemURL(
    const blink::StorageKey& storage_key,
    const std::string& mount_name,
    const base::FilePath& path) const {}

void ExternalMountPoints::RevokeAllFileSystems() {}

ExternalMountPoints::ExternalMountPoints() = default;

ExternalMountPoints::~ExternalMountPoints() = default;

FileSystemURL ExternalMountPoints::CrackFileSystemURL(
    const FileSystemURL& url) const {}

bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
                                                FileSystemType type,
                                                const base::FilePath& path) {}

}  // namespace storage