#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 {
base::FilePath NormalizeFilePath(const base::FilePath& path) { … }
bool IsOverlappingMountPathForbidden(FileSystemType type) { … }
class SystemMountPointsLazyWrapper { … };
base::LazyInstance<SystemMountPointsLazyWrapper>::Leaky
g_external_mount_points = …;
}
class ExternalMountPoints::Instance { … };
ExternalMountPoints* ExternalMountPoints::GetSystemInstance() { … }
scoped_refptr<ExternalMountPoints> ExternalMountPoints::CreateRefCounted() { … }
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) { … }
}