#include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
#include <memory>
#include "base/check.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/scoped_blocking_call.h"
#include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants.h"
#include "chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h"
#include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
#include "chrome/browser/sync_file_system/logger.h"
#include "components/drive/drive_api_util.h"
#include "google_apis/common/api_error_codes.h"
#include "google_apis/drive/drive_api_parser.h"
#include "third_party/leveldatabase/src/include/leveldb/status.h"
namespace sync_file_system {
namespace drive_backend {
void PutVersionToDB(int64_t version, LevelDBWrapper* db) { … }
void PutServiceMetadataToDB(const ServiceMetadata& service_metadata,
LevelDBWrapper* db) { … }
void PutFileMetadataToDB(const FileMetadata& file, LevelDBWrapper* db) { … }
void PutFileTrackerToDB(const FileTracker& tracker, LevelDBWrapper* db) { … }
void PutFileMetadataDeletionToDB(const std::string& file_id,
LevelDBWrapper* db) { … }
void PutFileTrackerDeletionToDB(int64_t tracker_id, LevelDBWrapper* db) { … }
bool HasFileAsParent(const FileDetails& details, const std::string& file_id) { … }
bool IsAppRoot(const FileTracker& tracker) { … }
std::string GetTrackerTitle(const FileTracker& tracker) { … }
SyncStatusCode ApiErrorCodeToSyncStatusCode(google_apis::ApiErrorCode error) { … }
bool RemovePrefix(const std::string& str,
const std::string& prefix,
std::string* out) { … }
std::unique_ptr<ServiceMetadata> InitializeServiceMetadata(LevelDBWrapper* db) { … }
}
}