#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/drive/drive_api_util.h"
#include <string>
#include <string_view>
#include "base/containers/heap_array.h"
#include "base/files/file.h"
#include "base/hash/md5.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/atomic_flag.h"
#include "third_party/re2/src/re2/re2.h"
namespace drive {
namespace util {
namespace {
struct HostedDocumentKind { … };
const HostedDocumentKind kHostedDocumentKinds[] = …;
const char kUnknownHostedDocumentExtension[] = …;
const int kMd5DigestBufferSize = …;
}
std::string EscapeQueryStringValue(const std::string& str) { … }
std::string TranslateQuery(const std::string& original_query) { … }
std::string CanonicalizeResourceId(const std::string& resource_id) { … }
std::string GetMd5Digest(const base::FilePath& file_path,
const base::AtomicFlag* cancellation_flag) { … }
bool IsKnownHostedDocumentMimeType(const std::string& mime_type) { … }
bool HasHostedDocumentExtension(const base::FilePath& path) { … }
bool IsEncryptedMimeType(const std::string& mime_type) { … }
}
}