#include "google_apis/drive/drive_api_url_generator.h"
#include "base/check_op.h"
#include "base/command_line.h"
#include "base/notreached.h"
#include "base/strings/escape.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "google_apis/google_api_keys.h"
#include "net/base/url_util.h"
namespace google_apis {
namespace {
const char kDriveV2AboutUrl[] = …;
const char kDriveV2ChangelistUrl[] = …;
const char kDriveV2StartPageTokenUrl[] = …;
const char kDriveV2FilesUrl[] = …;
const char kDriveV2FileUrlPrefix[] = …;
const char kDriveV2ChildrenUrlFormat[] = …;
const char kDriveV2ChildrenUrlForRemovalFormat[] = …;
const char kDriveV2FileCopyUrlFormat[] = …;
const char kDriveV2FileDeleteUrlFormat[] = …;
const char kDriveV2FileTrashUrlFormat[] = …;
const char kDriveV2UploadNewFileUrl[] = …;
const char kDriveV2UploadExistingFileUrlPrefix[] = …;
const char kDriveV2BatchUploadUrl[] = …;
const char kDriveV2PermissionsUrlFormat[] = …;
const char kDriveV2DownloadUrlFormat[] = …;
const char kDriveV2ThumbnailUrlFormat[] = …;
const char kDriveV2TeamDrivesUrl[] = …;
const char kIncludeTeamDriveItems[] = …;
const char kSupportsTeamDrives[] = …;
const char kCorpora[] = …;
const char kCorporaAllTeamDrives[] = …;
const char kCorporaDefault[] = …;
const char kCorporaTeamDrive[] = …;
const char kTeamDriveId[] = …;
GURL AddResumableUploadParam(const GURL& url) { … }
GURL AddMultipartUploadParam(const GURL& url) { … }
const char* GetCorporaString(FilesListCorpora corpora) { … }
}
DriveApiUrlGenerator::DriveApiUrlGenerator(const GURL& base_url,
const GURL& base_thumbnail_url)
: … { … }
DriveApiUrlGenerator::DriveApiUrlGenerator(const DriveApiUrlGenerator& src) =
default;
DriveApiUrlGenerator::~DriveApiUrlGenerator() { … }
const char DriveApiUrlGenerator::kBaseThumbnailUrlForProduction[] = …;
GURL DriveApiUrlGenerator::GetAboutGetUrl() const { … }
GURL DriveApiUrlGenerator::GetFilesGetUrl(const std::string& file_id,
const GURL& embed_origin) const { … }
GURL DriveApiUrlGenerator::GetFilesInsertUrl(
const std::string& visibility) const { … }
GURL DriveApiUrlGenerator::GetFilesPatchUrl(const std::string& file_id,
bool set_modified_date,
bool update_viewed_date) const { … }
GURL DriveApiUrlGenerator::GetFilesCopyUrl(
const std::string& file_id,
const std::string& visibility) const { … }
GURL DriveApiUrlGenerator::GetFilesListUrl(int max_results,
const std::string& page_token,
FilesListCorpora corpora,
const std::string& team_drive_id,
const std::string& q) const { … }
GURL DriveApiUrlGenerator::GetFilesDeleteUrl(const std::string& file_id) const { … }
GURL DriveApiUrlGenerator::GetFilesTrashUrl(const std::string& file_id) const { … }
GURL DriveApiUrlGenerator::GetChangesListUrl(
bool include_deleted,
int max_results,
const std::string& page_token,
int64_t start_change_id,
const std::string& team_drive_id) const { … }
GURL DriveApiUrlGenerator::GetChildrenInsertUrl(
const std::string& file_id) const { … }
GURL DriveApiUrlGenerator::GetChildrenDeleteUrl(
const std::string& child_id, const std::string& folder_id) const { … }
GURL DriveApiUrlGenerator::GetInitiateUploadNewFileUrl(
bool set_modified_date) const { … }
GURL DriveApiUrlGenerator::GetInitiateUploadExistingFileUrl(
const std::string& resource_id,
bool set_modified_date) const { … }
GURL DriveApiUrlGenerator::GetMultipartUploadNewFileUrl(
bool set_modified_date) const { … }
GURL DriveApiUrlGenerator::GetMultipartUploadExistingFileUrl(
const std::string& resource_id,
bool set_modified_date) const { … }
GURL DriveApiUrlGenerator::GenerateDownloadFileUrl(
const std::string& resource_id) const { … }
GURL DriveApiUrlGenerator::GetPermissionsInsertUrl(
const std::string& resource_id) const { … }
GURL DriveApiUrlGenerator::GetThumbnailUrl(const std::string& resource_id,
int width,
int height,
bool crop) const { … }
GURL DriveApiUrlGenerator::GetBatchUploadUrl() const { … }
GURL DriveApiUrlGenerator::GetTeamDriveListUrl(
int max_results,
const std::string& page_token) const { … }
GURL DriveApiUrlGenerator::GetStartPageTokenUrl(
const std::string& team_drive) const { … }
}