#include "storage/browser/file_system/file_system_url.h"
#include <sstream>
#include "base/check.h"
#include "base/files/safe_base_name.h"
#include "base/strings/escape.h"
#include "base/strings/string_util.h"
#include "storage/browser/file_system/file_system_util.h"
#include "storage/common/file_system/file_system_types.h"
#include "storage/common/file_system/file_system_util.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace storage {
namespace {
bool AreSameStorageKey(const FileSystemURL& a, const FileSystemURL& b) { … }
}
FileSystemURL::FileSystemURL()
: … { … }
FileSystemURL::FileSystemURL(const FileSystemURL&) = default;
FileSystemURL::FileSystemURL(FileSystemURL&&) noexcept = default;
FileSystemURL& FileSystemURL::operator=(const FileSystemURL&) = default;
FileSystemURL& FileSystemURL::operator=(FileSystemURL&&) noexcept = default;
FileSystemURL::~FileSystemURL() = default;
FileSystemURL FileSystemURL::CreateSibling(
const base::SafeBaseName& sibling_name) const { … }
FileSystemURL FileSystemURL::CreateForTest(const GURL& url) { … }
FileSystemURL FileSystemURL::CreateForTest(const blink::StorageKey& storage_key,
FileSystemType mount_type,
const base::FilePath& virtual_path) { … }
FileSystemURL FileSystemURL::CreateForTest(
const blink::StorageKey& storage_key,
FileSystemType mount_type,
const base::FilePath& virtual_path,
const std::string& mount_filesystem_id,
FileSystemType cracked_type,
const base::FilePath& cracked_path,
const std::string& filesystem_id,
const FileSystemMountOption& mount_option) { … }
bool FileSystemURL::TypeImpliesPathIsReal(FileSystemType type) { … }
FileSystemURL::FileSystemURL(const GURL& url,
const blink::StorageKey& storage_key)
: … { … }
FileSystemURL::FileSystemURL(const blink::StorageKey& storage_key,
FileSystemType mount_type,
const base::FilePath& virtual_path)
: … { … }
FileSystemURL::FileSystemURL(const blink::StorageKey& storage_key,
FileSystemType mount_type,
const base::FilePath& virtual_path,
const std::string& mount_filesystem_id,
FileSystemType cracked_type,
const base::FilePath& cracked_path,
const std::string& filesystem_id,
const FileSystemMountOption& mount_option)
: … { … }
GURL FileSystemURL::ToGURL() const { … }
std::string FileSystemURL::DebugString() const { … }
BucketLocator FileSystemURL::GetBucket() const { … }
bool FileSystemURL::IsParent(const FileSystemURL& child) const { … }
bool FileSystemURL::IsInSameFileSystem(const FileSystemURL& other) const { … }
bool FileSystemURL::operator==(const FileSystemURL& that) const { … }
bool FileSystemURL::Comparator::operator()(const FileSystemURL& lhs,
const FileSystemURL& rhs) const { … }
}