#include "components/drive/service/dummy_drive_service.h"
#include <memory>
#include "base/functional/bind.h"
AboutResourceCallback;
AuthStatusCallback;
CancelCallbackOnce;
ChangeListCallback;
DownloadActionCallback;
EntryActionCallback;
FileListCallback;
FileResourceCallback;
GetContentCallback;
InitiateUploadCallback;
ProgressCallback;
TeamDriveListCallback;
UploadRangeCallback;
namespace drive {
DummyDriveService::DummyDriveService() = default;
DummyDriveService::~DummyDriveService() = default;
void DummyDriveService::Initialize(const CoreAccountId& account_id) { … }
void DummyDriveService::AddObserver(DriveServiceObserver* observer) { … }
void DummyDriveService::RemoveObserver(DriveServiceObserver* observer) { … }
bool DummyDriveService::CanSendRequest() const { … }
bool DummyDriveService::HasAccessToken() const { … }
void DummyDriveService::RequestAccessToken(AuthStatusCallback callback) { … }
bool DummyDriveService::HasRefreshToken() const { … }
void DummyDriveService::ClearAccessToken() { … }
void DummyDriveService::ClearRefreshToken() { … }
std::string DummyDriveService::GetRootResourceId() const { … }
CancelCallbackOnce DummyDriveService::GetAllTeamDriveList(
TeamDriveListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetAllFileList(
const std::string& team_drive_id,
FileListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetFileListInDirectory(
const std::string& directory_resource_id,
FileListCallback callback) { … }
CancelCallbackOnce DummyDriveService::Search(const std::string& search_query,
FileListCallback callback) { … }
CancelCallbackOnce DummyDriveService::SearchByTitle(
const std::string& title,
const std::string& directory_resource_id,
FileListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetChangeList(
int64_t start_changestamp,
ChangeListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetChangeListByToken(
const std::string& team_drive_id,
const std::string& start_page_token,
ChangeListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetRemainingChangeList(
const GURL& next_link,
ChangeListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetRemainingTeamDriveList(
const std::string& page_token,
TeamDriveListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetRemainingFileList(
const GURL& next_link,
FileListCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetFileResource(
const std::string& resource_id,
FileResourceCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetAboutResource(
AboutResourceCallback callback) { … }
CancelCallbackOnce DummyDriveService::GetStartPageToken(
const std::string& team_drive_id,
google_apis::StartPageTokenCallback callback) { … }
CancelCallbackOnce DummyDriveService::DeleteResource(
const std::string& resource_id,
const std::string& etag,
EntryActionCallback callback) { … }
CancelCallbackOnce DummyDriveService::TrashResource(
const std::string& resource_id,
EntryActionCallback callback) { … }
CancelCallbackOnce DummyDriveService::DownloadFile(
const base::FilePath& local_cache_path,
const std::string& resource_id,
DownloadActionCallback download_action_callback,
const GetContentCallback& get_content_callback,
ProgressCallback progress_callback) { … }
CancelCallbackOnce DummyDriveService::CopyResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
const base::Time& last_modified,
FileResourceCallback callback) { … }
CancelCallbackOnce DummyDriveService::UpdateResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
const base::Time& last_modified,
const base::Time& last_viewed_by_me,
const google_apis::drive::Properties& properties,
FileResourceCallback callback) { … }
CancelCallbackOnce DummyDriveService::AddResourceToDirectory(
const std::string& parent_resource_id,
const std::string& resource_id,
EntryActionCallback callback) { … }
CancelCallbackOnce DummyDriveService::RemoveResourceFromDirectory(
const std::string& parent_resource_id,
const std::string& resource_id,
EntryActionCallback callback) { … }
CancelCallbackOnce DummyDriveService::AddNewDirectory(
const std::string& parent_resource_id,
const std::string& directory_title,
const AddNewDirectoryOptions& options,
FileResourceCallback callback) { … }
CancelCallbackOnce DummyDriveService::InitiateUploadNewFile(
const std::string& content_type,
int64_t content_length,
const std::string& parent_resource_id,
const std::string& title,
const UploadNewFileOptions& options,
InitiateUploadCallback callback) { … }
CancelCallbackOnce DummyDriveService::InitiateUploadExistingFile(
const std::string& content_type,
int64_t content_length,
const std::string& resource_id,
const UploadExistingFileOptions& options,
InitiateUploadCallback callback) { … }
CancelCallbackOnce DummyDriveService::ResumeUpload(
const GURL& upload_url,
int64_t start_position,
int64_t end_position,
int64_t content_length,
const std::string& content_type,
const base::FilePath& local_file_path,
UploadRangeCallback callback,
ProgressCallback progress_callback) { … }
CancelCallbackOnce DummyDriveService::GetUploadStatus(
const GURL& upload_url,
int64_t content_length,
UploadRangeCallback callback) { … }
CancelCallbackOnce DummyDriveService::MultipartUploadNewFile(
const std::string& content_type,
int64_t content_length,
const std::string& parent_resource_id,
const std::string& title,
const base::FilePath& local_file_path,
const UploadNewFileOptions& options,
FileResourceCallback callback,
ProgressCallback progress_callback) { … }
CancelCallbackOnce DummyDriveService::MultipartUploadExistingFile(
const std::string& content_type,
int64_t content_length,
const std::string& resource_id,
const base::FilePath& local_file_path,
const UploadExistingFileOptions& options,
FileResourceCallback callback,
ProgressCallback progress_callback) { … }
CancelCallbackOnce DummyDriveService::AddPermission(
const std::string& resource_id,
const std::string& email,
google_apis::drive::PermissionRole role,
EntryActionCallback callback) { … }
std::unique_ptr<BatchRequestConfiguratorInterface>
DummyDriveService::StartBatchRequest() { … }
}