chromium/storage/common/file_system/file_system_util.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "storage/common/file_system/file_system_util.h"

#include <stddef.h>

#include <algorithm>

#include "base/check.h"
#include "base/notreached.h"
#include "base/strings/escape.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "build/build_config.h"
#include "net/base/net_errors.h"
#include "storage/common/database/database_identifier.h"
#include "url/gurl.h"

namespace storage {

const char kPersistentDir[] =;
const char kTemporaryDir[] =;
const char kIsolatedDir[] =;
const char kExternalDir[] =;
const char kTestDir[] =;

const base::FilePath::CharType VirtualPath::kRoot[] =);
const base::FilePath::CharType VirtualPath::kSeparator =);

// TODO(ericu): Consider removing support for '\', even on Windows, if possible.
// There's a lot of test code that will need reworking, and we may have trouble
// with base::FilePath elsewhere [e.g. DirName and other methods may also need
// replacement].
base::FilePath VirtualPath::BaseName(const base::FilePath& virtual_path) {}

base::FilePath VirtualPath::DirName(const base::FilePath& virtual_path) {}

std::vector<base::FilePath::StringType> VirtualPath::GetComponents(
    const base::FilePath& path) {}

std::vector<std::string> VirtualPath::GetComponentsUTF8Unsafe(
    const base::FilePath& path) {}

base::FilePath::StringType VirtualPath::GetNormalizedFilePath(
    const base::FilePath& path) {}

bool VirtualPath::IsAbsolute(const base::FilePath::StringType& path) {}

bool VirtualPath::IsRootPath(const base::FilePath& path) {}

bool ParseFileSystemSchemeURL(const GURL& url,
                              GURL* origin_url,
                              FileSystemType* type,
                              base::FilePath* virtual_path) {}

GURL GetFileSystemRootURI(const GURL& origin_url, FileSystemType type) {}

std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) {}

std::string GetFileSystemTypeString(FileSystemType type) {}

std::string FilePathToString(const base::FilePath& file_path) {}

base::FilePath StringToFilePath(const std::string& file_path_string) {}

bool GetFileSystemPublicType(const std::string type_string,
                             blink::WebFileSystemType* type) {}

std::string GetIsolatedFileSystemName(const GURL& origin_url,
                                      const std::string& filesystem_id) {}

bool CrackIsolatedFileSystemName(const std::string& filesystem_name,
                                 std::string* filesystem_id) {}

bool ValidateIsolatedFileSystemId(const std::string& filesystem_id) {}

std::string GetIsolatedFileSystemRootURIString(
    const GURL& origin_url,
    const std::string& filesystem_id,
    const std::string& optional_root_name) {}

std::string GetExternalFileSystemRootURIString(const GURL& origin_url,
                                               const std::string& mount_name) {}

base::File::Error NetErrorToFileError(int error) {}

}  // namespace storage