chromium/components/drive/file_system_core_util.h

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

#ifndef COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_
#define COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_

#include <string>

#include "base/files/file_path.h"
#include "components/drive/file_errors.h"
#include "url/gurl.h"

namespace drive {

namespace util {

// "drive" diretory's local ID is fixed to this value.
const char kDriveGrandRootLocalId[] =;

// "drive/other" diretory's local ID is fixed to this value.
const char kDriveOtherDirLocalId[] =;

// "drive/team_drives" diretory's local ID is fixed to this value.
const char kDriveTeamDrivesDirLocalId[] =;

// "drive/Computers" directory's local ID is fixed to this value.
constexpr char kDriveComputersDirLocalId[] =;

// "drive/trash" diretory's local ID is fixed to this value.
const char kDriveTrashDirLocalId[] =;

// The directory names used for the Google Drive file system tree. These names
// are used in URLs for the file manager, hence user-visible.
const char kDriveGrandRootDirName[] =;
const char kDriveMyDriveRootDirName[] =;
const char kDriveOtherDirName[] =;
const char kDriveTeamDrivesDirName[] =;
constexpr char kDriveComputersDirName[] =;
const char kDriveTrashDirName[] =;

// The team_drive_id value that signifies the users default corpus.
constexpr char kTeamDriveIdDefaultCorpus[] =;

// Returns the path of the top root of the pseudo tree.
const base::FilePath& GetDriveGrandRootPath();

// Converts a numerical changestamp value to a start page token.
std::string ConvertChangestampToStartPageToken(int64_t changestamp);

// Helper to destroy objects which needs Destroy() to be called on destruction.
struct DestroyHelper {};

// Reads URL from a GDoc file.
GURL ReadUrlFromGDocFile(const base::FilePath& file_path);

// Reads resource ID from a GDoc file.
std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path);

}  // namespace util
}  // namespace drive

#endif  // COMPONENTS_DRIVE_FILE_SYSTEM_CORE_UTIL_H_