Commit 85f04135 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by Commit Bot

Return CancelCallbackOnce in drive

This changes return type of following functions:
* SearchByTitle
* GetRemainingFileList
* AddNewDirectory
* RemoveResourceFromDirectory
* GetFileListInDirectory

Bug: 1007686
Change-Id: I4720a98a28d78d76f200535c1b4199fb5347147d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304668Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 604cd17e
...@@ -30,7 +30,7 @@ DriveServiceOnWorker::DriveServiceOnWorker( ...@@ -30,7 +30,7 @@ DriveServiceOnWorker::DriveServiceOnWorker(
DriveServiceOnWorker::~DriveServiceOnWorker() {} DriveServiceOnWorker::~DriveServiceOnWorker() {}
google_apis::CancelCallback DriveServiceOnWorker::AddNewDirectory( google_apis::CancelCallbackOnce DriveServiceOnWorker::AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const drive::AddNewDirectoryOptions& options, const drive::AddNewDirectoryOptions& options,
...@@ -44,7 +44,7 @@ google_apis::CancelCallback DriveServiceOnWorker::AddNewDirectory( ...@@ -44,7 +44,7 @@ google_apis::CancelCallback DriveServiceOnWorker::AddNewDirectory(
worker_task_runner_.get(), FROM_HERE, worker_task_runner_.get(), FROM_HERE,
std::move(callback)))); std::move(callback))));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::DeleteResource( google_apis::CancelCallback DriveServiceOnWorker::DeleteResource(
...@@ -146,7 +146,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetChangeListByToken( ...@@ -146,7 +146,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetChangeListByToken(
return google_apis::CancelCallback(); return google_apis::CancelCallback();
} }
google_apis::CancelCallback DriveServiceOnWorker::GetRemainingChangeList( google_apis::CancelCallbackOnce DriveServiceOnWorker::GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) { google_apis::ChangeListCallback callback) {
DCHECK(sequence_checker_.CalledOnValidSequence()); DCHECK(sequence_checker_.CalledOnValidSequence());
...@@ -158,7 +158,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingChangeList( ...@@ -158,7 +158,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingChangeList(
RelayCallbackToTaskRunner(worker_task_runner_.get(), FROM_HERE, RelayCallbackToTaskRunner(worker_task_runner_.get(), FROM_HERE,
std::move(callback)))); std::move(callback))));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
std::string DriveServiceOnWorker::GetRootResourceId() const { std::string DriveServiceOnWorker::GetRootResourceId() const {
...@@ -182,7 +182,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingTeamDriveList( ...@@ -182,7 +182,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingTeamDriveList(
return google_apis::CancelCallback(); return google_apis::CancelCallback();
} }
google_apis::CancelCallback DriveServiceOnWorker::GetRemainingFileList( google_apis::CancelCallbackOnce DriveServiceOnWorker::GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) { const google_apis::FileListCallback& callback) {
DCHECK(sequence_checker_.CalledOnValidSequence()); DCHECK(sequence_checker_.CalledOnValidSequence());
...@@ -194,7 +194,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingFileList( ...@@ -194,7 +194,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetRemainingFileList(
RelayCallbackToTaskRunner(worker_task_runner_.get(), RelayCallbackToTaskRunner(worker_task_runner_.get(),
FROM_HERE, callback))); FROM_HERE, callback)));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::GetFileResource( google_apis::CancelCallback DriveServiceOnWorker::GetFileResource(
...@@ -212,7 +212,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetFileResource( ...@@ -212,7 +212,7 @@ google_apis::CancelCallback DriveServiceOnWorker::GetFileResource(
return google_apis::CancelCallback(); return google_apis::CancelCallback();
} }
google_apis::CancelCallback DriveServiceOnWorker::GetFileListInDirectory( google_apis::CancelCallbackOnce DriveServiceOnWorker::GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) { const google_apis::FileListCallback& callback) {
DCHECK(sequence_checker_.CalledOnValidSequence()); DCHECK(sequence_checker_.CalledOnValidSequence());
...@@ -224,10 +224,11 @@ google_apis::CancelCallback DriveServiceOnWorker::GetFileListInDirectory( ...@@ -224,10 +224,11 @@ google_apis::CancelCallback DriveServiceOnWorker::GetFileListInDirectory(
RelayCallbackToTaskRunner(worker_task_runner_.get(), RelayCallbackToTaskRunner(worker_task_runner_.get(),
FROM_HERE, callback))); FROM_HERE, callback)));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::RemoveResourceFromDirectory( google_apis::CancelCallbackOnce
DriveServiceOnWorker::RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) { const google_apis::EntryActionCallback& callback) {
...@@ -240,10 +241,10 @@ google_apis::CancelCallback DriveServiceOnWorker::RemoveResourceFromDirectory( ...@@ -240,10 +241,10 @@ google_apis::CancelCallback DriveServiceOnWorker::RemoveResourceFromDirectory(
RelayCallbackToTaskRunner(worker_task_runner_.get(), RelayCallbackToTaskRunner(worker_task_runner_.get(),
FROM_HERE, callback))); FROM_HERE, callback)));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::SearchByTitle( google_apis::CancelCallbackOnce DriveServiceOnWorker::SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) { const google_apis::FileListCallback& callback) {
...@@ -256,7 +257,7 @@ google_apis::CancelCallback DriveServiceOnWorker::SearchByTitle( ...@@ -256,7 +257,7 @@ google_apis::CancelCallback DriveServiceOnWorker::SearchByTitle(
RelayCallbackToTaskRunner(worker_task_runner_.get(), RelayCallbackToTaskRunner(worker_task_runner_.get(),
FROM_HERE, callback))); FROM_HERE, callback)));
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
bool DriveServiceOnWorker::HasRefreshToken() const { bool DriveServiceOnWorker::HasRefreshToken() const {
......
...@@ -38,7 +38,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface { ...@@ -38,7 +38,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
base::SequencedTaskRunner* worker_task_runner); base::SequencedTaskRunner* worker_task_runner);
~DriveServiceOnWorker() override; ~DriveServiceOnWorker() override;
google_apis::CancelCallback AddNewDirectory( google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const drive::AddNewDirectoryOptions& options, const drive::AddNewDirectoryOptions& options,
...@@ -72,7 +72,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface { ...@@ -72,7 +72,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
const std::string& start_page_token, const std::string& start_page_token,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingChangeList( google_apis::CancelCallbackOnce GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
...@@ -82,7 +82,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface { ...@@ -82,7 +82,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
const std::string& page_token, const std::string& page_token,
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetRemainingFileList( google_apis::CancelCallbackOnce GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
...@@ -90,16 +90,16 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface { ...@@ -90,16 +90,16 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
const std::string& resource_id, const std::string& resource_id,
google_apis::FileResourceCallback callback) override; google_apis::FileResourceCallback callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallbackOnce GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback RemoveResourceFromDirectory( google_apis::CancelCallbackOnce RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback SearchByTitle( google_apis::CancelCallbackOnce SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
......
...@@ -60,7 +60,7 @@ FakeDriveServiceWrapper::FakeDriveServiceWrapper() ...@@ -60,7 +60,7 @@ FakeDriveServiceWrapper::FakeDriveServiceWrapper()
FakeDriveServiceWrapper::~FakeDriveServiceWrapper() {} FakeDriveServiceWrapper::~FakeDriveServiceWrapper() {}
CancelCallback FakeDriveServiceWrapper::AddNewDirectory( CancelCallbackOnce FakeDriveServiceWrapper::AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_name, const std::string& directory_name,
const drive::AddNewDirectoryOptions& options, const drive::AddNewDirectoryOptions& options,
......
...@@ -26,7 +26,7 @@ class FakeDriveServiceWrapper : public drive::FakeDriveService { ...@@ -26,7 +26,7 @@ class FakeDriveServiceWrapper : public drive::FakeDriveService {
~FakeDriveServiceWrapper() override; ~FakeDriveServiceWrapper() override;
// DriveServiceInterface overrides. // DriveServiceInterface overrides.
google_apis::CancelCallback AddNewDirectory( google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_name, const std::string& directory_name,
const drive::AddNewDirectoryOptions& options, const drive::AddNewDirectoryOptions& options,
......
...@@ -65,7 +65,7 @@ SyncEngineInitializer::SyncEngineInitializer( ...@@ -65,7 +65,7 @@ SyncEngineInitializer::SyncEngineInitializer(
SyncEngineInitializer::~SyncEngineInitializer() { SyncEngineInitializer::~SyncEngineInitializer() {
if (!cancel_callback_.is_null()) if (!cancel_callback_.is_null())
cancel_callback_.Run(); std::move(cancel_callback_).Run();
} }
void SyncEngineInitializer::RunPreflight(std::unique_ptr<SyncTaskToken> token) { void SyncEngineInitializer::RunPreflight(std::unique_ptr<SyncTaskToken> token) {
...@@ -122,7 +122,7 @@ void SyncEngineInitializer::DidGetAboutResource( ...@@ -122,7 +122,7 @@ void SyncEngineInitializer::DidGetAboutResource(
std::unique_ptr<SyncTaskToken> token, std::unique_ptr<SyncTaskToken> token,
google_apis::DriveApiErrorCode error, google_apis::DriveApiErrorCode error,
std::unique_ptr<google_apis::AboutResource> about_resource) { std::unique_ptr<google_apis::AboutResource> about_resource) {
cancel_callback_.Reset(); std::move(cancel_callback_).Reset();
SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error); SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) { if (status != SYNC_STATUS_OK) {
...@@ -161,7 +161,7 @@ void SyncEngineInitializer::DidFindSyncRoot( ...@@ -161,7 +161,7 @@ void SyncEngineInitializer::DidFindSyncRoot(
std::unique_ptr<SyncTaskToken> token, std::unique_ptr<SyncTaskToken> token,
google_apis::DriveApiErrorCode error, google_apis::DriveApiErrorCode error,
std::unique_ptr<google_apis::FileList> file_list) { std::unique_ptr<google_apis::FileList> file_list) {
cancel_callback_.Reset(); std::move(cancel_callback_).Reset();
SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error); SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) { if (status != SYNC_STATUS_OK) {
...@@ -241,7 +241,7 @@ void SyncEngineInitializer::DidCreateSyncRoot( ...@@ -241,7 +241,7 @@ void SyncEngineInitializer::DidCreateSyncRoot(
google_apis::DriveApiErrorCode error, google_apis::DriveApiErrorCode error,
std::unique_ptr<google_apis::FileResource> entry) { std::unique_ptr<google_apis::FileResource> entry) {
DCHECK(!sync_root_folder_); DCHECK(!sync_root_folder_);
cancel_callback_.Reset(); std::move(cancel_callback_).Reset();
SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error); SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) { if (status != SYNC_STATUS_OK) {
...@@ -270,7 +270,7 @@ void SyncEngineInitializer::DetachSyncRoot( ...@@ -270,7 +270,7 @@ void SyncEngineInitializer::DetachSyncRoot(
void SyncEngineInitializer::DidDetachSyncRoot( void SyncEngineInitializer::DidDetachSyncRoot(
std::unique_ptr<SyncTaskToken> token, std::unique_ptr<SyncTaskToken> token,
google_apis::DriveApiErrorCode error) { google_apis::DriveApiErrorCode error) {
cancel_callback_.Reset(); std::move(cancel_callback_).Reset();
SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error); SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) { if (status != SYNC_STATUS_OK) {
...@@ -299,7 +299,7 @@ void SyncEngineInitializer::DidListAppRootFolders( ...@@ -299,7 +299,7 @@ void SyncEngineInitializer::DidListAppRootFolders(
std::unique_ptr<SyncTaskToken> token, std::unique_ptr<SyncTaskToken> token,
google_apis::DriveApiErrorCode error, google_apis::DriveApiErrorCode error,
std::unique_ptr<google_apis::FileList> file_list) { std::unique_ptr<google_apis::FileList> file_list) {
cancel_callback_.Reset(); std::move(cancel_callback_).Reset();
SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error); SyncStatusCode status = DriveApiErrorCodeToSyncStatusCode(error);
if (status != SYNC_STATUS_OK) { if (status != SYNC_STATUS_OK) {
......
...@@ -99,7 +99,7 @@ class SyncEngineInitializer : public SyncTask { ...@@ -99,7 +99,7 @@ class SyncEngineInitializer : public SyncTask {
SyncEngineContext* sync_context_; // Not owned. SyncEngineContext* sync_context_; // Not owned.
leveldb::Env* env_override_; leveldb::Env* env_override_;
google_apis::CancelCallback cancel_callback_; google_apis::CancelCallbackOnce cancel_callback_;
base::FilePath database_path_; base::FilePath database_path_;
int find_sync_root_retry_count_; int find_sync_root_retry_count_;
......
...@@ -315,7 +315,7 @@ CancelCallbackOnce DriveAPIService::GetAllFileList( ...@@ -315,7 +315,7 @@ CancelCallbackOnce DriveAPIService::GetAllFileList(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::GetFileListInDirectory( CancelCallbackOnce DriveAPIService::GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -361,7 +361,7 @@ CancelCallback DriveAPIService::Search( ...@@ -361,7 +361,7 @@ CancelCallback DriveAPIService::Search(
kFileListFields, callback); kFileListFields, callback);
} }
CancelCallback DriveAPIService::SearchByTitle( CancelCallbackOnce DriveAPIService::SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { const FileListCallback& callback) {
...@@ -419,7 +419,7 @@ CancelCallback DriveAPIService::GetChangeListByToken( ...@@ -419,7 +419,7 @@ CancelCallback DriveAPIService::GetChangeListByToken(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::GetRemainingChangeList( CancelCallbackOnce DriveAPIService::GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
ChangeListCallback callback) { ChangeListCallback callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -450,7 +450,7 @@ CancelCallback DriveAPIService::GetRemainingTeamDriveList( ...@@ -450,7 +450,7 @@ CancelCallback DriveAPIService::GetRemainingTeamDriveList(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::GetRemainingFileList( CancelCallbackOnce DriveAPIService::GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -546,7 +546,7 @@ CancelCallback DriveAPIService::TrashResource( ...@@ -546,7 +546,7 @@ CancelCallback DriveAPIService::TrashResource(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::AddNewDirectory( CancelCallbackOnce DriveAPIService::AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
...@@ -637,7 +637,7 @@ CancelCallback DriveAPIService::AddResourceToDirectory( ...@@ -637,7 +637,7 @@ CancelCallback DriveAPIService::AddResourceToDirectory(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::RemoveResourceFromDirectory( CancelCallbackOnce DriveAPIService::RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const EntryActionCallback& callback) { const EntryActionCallback& callback) {
......
...@@ -134,13 +134,13 @@ class DriveAPIService : public DriveServiceInterface, ...@@ -134,13 +134,13 @@ class DriveAPIService : public DriveServiceInterface,
google_apis::CancelCallbackOnce GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallbackOnce GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback Search( google_apis::CancelCallback Search(
const std::string& search_query, const std::string& search_query,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback SearchByTitle( google_apis::CancelCallbackOnce SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
...@@ -154,10 +154,10 @@ class DriveAPIService : public DriveServiceInterface, ...@@ -154,10 +154,10 @@ class DriveAPIService : public DriveServiceInterface,
google_apis::CancelCallback GetRemainingTeamDriveList( google_apis::CancelCallback GetRemainingTeamDriveList(
const std::string& page_token, const std::string& page_token,
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetRemainingChangeList( google_apis::CancelCallbackOnce GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingFileList( google_apis::CancelCallbackOnce GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileResource( google_apis::CancelCallback GetFileResource(
...@@ -199,11 +199,11 @@ class DriveAPIService : public DriveServiceInterface, ...@@ -199,11 +199,11 @@ class DriveAPIService : public DriveServiceInterface,
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback RemoveResourceFromDirectory( google_apis::CancelCallbackOnce RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback AddNewDirectory( google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
......
...@@ -229,7 +229,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -229,7 +229,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// //
// |directory_resource_id| must not be empty. // |directory_resource_id| must not be empty.
// |callback| must not be null. // |callback| must not be null.
virtual google_apis::CancelCallback GetFileListInDirectory( virtual google_apis::CancelCallbackOnce GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) = 0; const google_apis::FileListCallback& callback) = 0;
...@@ -254,7 +254,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -254,7 +254,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// GetRemainingFileList. // GetRemainingFileList.
// //
// |title| must not be empty, and |callback| must not be null. // |title| must not be empty, and |callback| must not be null.
virtual google_apis::CancelCallback SearchByTitle( virtual google_apis::CancelCallbackOnce SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) = 0; const google_apis::FileListCallback& callback) = 0;
...@@ -290,7 +290,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -290,7 +290,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// completion. // completion.
// //
// |next_link| must not be empty. |callback| must not be null. // |next_link| must not be empty. |callback| must not be null.
virtual google_apis::CancelCallback GetRemainingChangeList( virtual google_apis::CancelCallbackOnce GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) = 0; google_apis::ChangeListCallback callback) = 0;
...@@ -309,7 +309,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -309,7 +309,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// |callback| will be called upon completion. // |callback| will be called upon completion.
// //
// |next_link| must not be empty. |callback| must not be null. // |next_link| must not be empty. |callback| must not be null.
virtual google_apis::CancelCallback GetRemainingFileList( virtual google_apis::CancelCallbackOnce GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) = 0; const google_apis::FileListCallback& callback) = 0;
...@@ -396,7 +396,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -396,7 +396,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// |resource_id| from a collection represented by the |parent_resource_id|. // |resource_id| from a collection represented by the |parent_resource_id|.
// Upon completion, invokes |callback| with results on the calling thread. // Upon completion, invokes |callback| with results on the calling thread.
// |callback| must not be null. // |callback| must not be null.
virtual google_apis::CancelCallback RemoveResourceFromDirectory( virtual google_apis::CancelCallbackOnce RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) = 0; const google_apis::EntryActionCallback& callback) = 0;
...@@ -409,7 +409,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -409,7 +409,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// This function cannot be named as "CreateDirectory" as it conflicts with // This function cannot be named as "CreateDirectory" as it conflicts with
// a macro on Windows. // a macro on Windows.
// |callback| must not be null. // |callback| must not be null.
virtual google_apis::CancelCallback AddNewDirectory( virtual google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
......
...@@ -64,18 +64,22 @@ CancelCallbackOnce DummyDriveService::GetAllFileList( ...@@ -64,18 +64,22 @@ CancelCallbackOnce DummyDriveService::GetAllFileList(
return CancelCallbackOnce(); return CancelCallbackOnce();
} }
CancelCallback DummyDriveService::GetFileListInDirectory( CancelCallbackOnce DummyDriveService::GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { return CancelCallback(); } const FileListCallback& callback) {
return CancelCallbackOnce();
}
CancelCallback DummyDriveService::Search( CancelCallback DummyDriveService::Search(
const std::string& search_query, const std::string& search_query,
const FileListCallback& callback) { return CancelCallback(); } const FileListCallback& callback) { return CancelCallback(); }
CancelCallback DummyDriveService::SearchByTitle( CancelCallbackOnce DummyDriveService::SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { return CancelCallback(); } const FileListCallback& callback) {
return CancelCallbackOnce();
}
CancelCallback DummyDriveService::GetChangeList(int64_t start_changestamp, CancelCallback DummyDriveService::GetChangeList(int64_t start_changestamp,
ChangeListCallback callback) { ChangeListCallback callback) {
...@@ -89,10 +93,10 @@ CancelCallback DummyDriveService::GetChangeListByToken( ...@@ -89,10 +93,10 @@ CancelCallback DummyDriveService::GetChangeListByToken(
return CancelCallback(); return CancelCallback();
} }
CancelCallback DummyDriveService::GetRemainingChangeList( CancelCallbackOnce DummyDriveService::GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
ChangeListCallback callback) { ChangeListCallback callback) {
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback DummyDriveService::GetRemainingTeamDriveList( CancelCallback DummyDriveService::GetRemainingTeamDriveList(
...@@ -101,9 +105,11 @@ CancelCallback DummyDriveService::GetRemainingTeamDriveList( ...@@ -101,9 +105,11 @@ CancelCallback DummyDriveService::GetRemainingTeamDriveList(
return CancelCallback(); return CancelCallback();
} }
CancelCallback DummyDriveService::GetRemainingFileList( CancelCallbackOnce DummyDriveService::GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const FileListCallback& callback) { return CancelCallback(); } const FileListCallback& callback) {
return CancelCallback();
}
CancelCallback DummyDriveService::GetFileResource( CancelCallback DummyDriveService::GetFileResource(
const std::string& resource_id, const std::string& resource_id,
...@@ -165,17 +171,19 @@ CancelCallback DummyDriveService::AddResourceToDirectory( ...@@ -165,17 +171,19 @@ CancelCallback DummyDriveService::AddResourceToDirectory(
const std::string& resource_id, const std::string& resource_id,
const EntryActionCallback& callback) { return CancelCallback(); } const EntryActionCallback& callback) { return CancelCallback(); }
CancelCallback DummyDriveService::RemoveResourceFromDirectory( CancelCallbackOnce DummyDriveService::RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const EntryActionCallback& callback) { return CancelCallback(); } const EntryActionCallback& callback) {
return CancelCallback();
}
CancelCallback DummyDriveService::AddNewDirectory( CancelCallbackOnce DummyDriveService::AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
FileResourceCallback callback) { FileResourceCallback callback) {
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback DummyDriveService::InitiateUploadNewFile( CancelCallback DummyDriveService::InitiateUploadNewFile(
......
...@@ -38,13 +38,13 @@ class DummyDriveService : public DriveServiceInterface { ...@@ -38,13 +38,13 @@ class DummyDriveService : public DriveServiceInterface {
google_apis::CancelCallbackOnce GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallbackOnce GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback Search( google_apis::CancelCallback Search(
const std::string& search_query, const std::string& search_query,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback SearchByTitle( google_apis::CancelCallbackOnce SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
...@@ -55,13 +55,13 @@ class DummyDriveService : public DriveServiceInterface { ...@@ -55,13 +55,13 @@ class DummyDriveService : public DriveServiceInterface {
const std::string& team_drive_id, const std::string& team_drive_id,
const std::string& start_page_token, const std::string& start_page_token,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingChangeList( google_apis::CancelCallbackOnce GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingTeamDriveList( google_apis::CancelCallback GetRemainingTeamDriveList(
const std::string& page_token, const std::string& page_token,
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetRemainingFileList( google_apis::CancelCallbackOnce GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileResource( google_apis::CancelCallback GetFileResource(
...@@ -103,11 +103,11 @@ class DummyDriveService : public DriveServiceInterface { ...@@ -103,11 +103,11 @@ class DummyDriveService : public DriveServiceInterface {
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback RemoveResourceFromDirectory( google_apis::CancelCallbackOnce RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback AddNewDirectory( google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
......
...@@ -423,7 +423,7 @@ CancelCallbackOnce FakeDriveService::GetAllFileList( ...@@ -423,7 +423,7 @@ CancelCallbackOnce FakeDriveService::GetAllFileList(
return CancelCallbackOnce(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::GetFileListInDirectory( CancelCallbackOnce FakeDriveService::GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -437,7 +437,7 @@ CancelCallback FakeDriveService::GetFileListInDirectory( ...@@ -437,7 +437,7 @@ CancelCallback FakeDriveService::GetFileListInDirectory(
0, // start offset 0, // start offset
default_max_results_, &directory_load_count_, default_max_results_, &directory_load_count_,
base::BindOnce(&FileListCallbackAdapter, callback)); base::BindOnce(&FileListCallbackAdapter, callback));
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::Search( CancelCallback FakeDriveService::Search(
...@@ -457,7 +457,7 @@ CancelCallback FakeDriveService::Search( ...@@ -457,7 +457,7 @@ CancelCallback FakeDriveService::Search(
return CancelCallback(); return CancelCallback();
} }
CancelCallback FakeDriveService::SearchByTitle( CancelCallbackOnce FakeDriveService::SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const FileListCallback& callback) { const FileListCallback& callback) {
...@@ -474,7 +474,7 @@ CancelCallback FakeDriveService::SearchByTitle( ...@@ -474,7 +474,7 @@ CancelCallback FakeDriveService::SearchByTitle(
0, // start offset 0, // start offset
default_max_results_, nullptr, default_max_results_, nullptr,
base::BindOnce(&FileListCallbackAdapter, callback)); base::BindOnce(&FileListCallbackAdapter, callback));
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::GetChangeList(int64_t start_changestamp, CancelCallback FakeDriveService::GetChangeList(int64_t start_changestamp,
...@@ -513,7 +513,7 @@ CancelCallback FakeDriveService::GetChangeListByToken( ...@@ -513,7 +513,7 @@ CancelCallback FakeDriveService::GetChangeListByToken(
return CancelCallback(); return CancelCallback();
} }
CancelCallback FakeDriveService::GetRemainingChangeList( CancelCallbackOnce FakeDriveService::GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
ChangeListCallback callback) { ChangeListCallback callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -558,7 +558,7 @@ CancelCallback FakeDriveService::GetRemainingChangeList( ...@@ -558,7 +558,7 @@ CancelCallback FakeDriveService::GetRemainingChangeList(
GetChangeListInternal(start_changestamp, search_query, directory_resource_id, GetChangeListInternal(start_changestamp, search_query, directory_resource_id,
team_drive_id, start_offset, max_results, nullptr, team_drive_id, start_offset, max_results, nullptr,
std::move(callback)); std::move(callback));
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::GetRemainingTeamDriveList( CancelCallback FakeDriveService::GetRemainingTeamDriveList(
...@@ -577,7 +577,7 @@ CancelCallback FakeDriveService::GetRemainingTeamDriveList( ...@@ -577,7 +577,7 @@ CancelCallback FakeDriveService::GetRemainingTeamDriveList(
return CancelCallback(); return CancelCallback();
} }
CancelCallback FakeDriveService::GetRemainingFileList( CancelCallbackOnce FakeDriveService::GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -1012,7 +1012,7 @@ CancelCallback FakeDriveService::AddResourceToDirectory( ...@@ -1012,7 +1012,7 @@ CancelCallback FakeDriveService::AddResourceToDirectory(
return CancelCallback(); return CancelCallback();
} }
CancelCallback FakeDriveService::RemoveResourceFromDirectory( CancelCallbackOnce FakeDriveService::RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const EntryActionCallback& callback) { const EntryActionCallback& callback) {
...@@ -1022,14 +1022,14 @@ CancelCallback FakeDriveService::RemoveResourceFromDirectory( ...@@ -1022,14 +1022,14 @@ CancelCallback FakeDriveService::RemoveResourceFromDirectory(
if (offline_) { if (offline_) {
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(callback, DRIVE_NO_CONNECTION)); FROM_HERE, base::BindOnce(callback, DRIVE_NO_CONNECTION));
return CancelCallback(); return CancelCallbackOnce();
} }
EntryInfo* entry = FindEntryByResourceId(resource_id); EntryInfo* entry = FindEntryByResourceId(resource_id);
if (!entry) { if (!entry) {
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(callback, HTTP_NOT_FOUND)); FROM_HERE, base::BindOnce(callback, HTTP_NOT_FOUND));
return CancelCallback(); return CancelCallbackOnce();
} }
ChangeResource* change = &entry->change_resource; ChangeResource* change = &entry->change_resource;
...@@ -1044,16 +1044,16 @@ CancelCallback FakeDriveService::RemoveResourceFromDirectory( ...@@ -1044,16 +1044,16 @@ CancelCallback FakeDriveService::RemoveResourceFromDirectory(
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&FakeDriveService::NotifyObservers, FROM_HERE, base::BindOnce(&FakeDriveService::NotifyObservers,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
return CancelCallback(); return CancelCallbackOnce();
} }
} }
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(callback, HTTP_NOT_FOUND)); FROM_HERE, base::BindOnce(callback, HTTP_NOT_FOUND));
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::AddNewDirectory( CancelCallbackOnce FakeDriveService::AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
...@@ -1387,7 +1387,7 @@ void FakeDriveService::AddNewFileWithResourceId( ...@@ -1387,7 +1387,7 @@ void FakeDriveService::AddNewFileWithResourceId(
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
} }
CancelCallback FakeDriveService::AddNewDirectoryWithResourceId( CancelCallbackOnce FakeDriveService::AddNewDirectoryWithResourceId(
const std::string& resource_id, const std::string& resource_id,
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
...@@ -1400,7 +1400,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId( ...@@ -1400,7 +1400,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId(
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(callback), DRIVE_NO_CONNECTION, FROM_HERE, base::BindOnce(std::move(callback), DRIVE_NO_CONNECTION,
std::unique_ptr<FileResource>())); std::unique_ptr<FileResource>()));
return CancelCallback(); return CancelCallbackOnce();
} }
const EntryInfo* new_entry = AddNewEntry(resource_id, const EntryInfo* new_entry = AddNewEntry(resource_id,
...@@ -1413,7 +1413,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId( ...@@ -1413,7 +1413,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId(
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(callback), HTTP_NOT_FOUND, FROM_HERE, base::BindOnce(std::move(callback), HTTP_NOT_FOUND,
std::unique_ptr<FileResource>())); std::unique_ptr<FileResource>()));
return CancelCallback(); return CancelCallbackOnce();
} }
const google_apis::DriveApiErrorCode result = const google_apis::DriveApiErrorCode result =
...@@ -1428,7 +1428,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId( ...@@ -1428,7 +1428,7 @@ CancelCallback FakeDriveService::AddNewDirectoryWithResourceId(
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&FakeDriveService::NotifyObservers, FROM_HERE, base::BindOnce(&FakeDriveService::NotifyObservers,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
return CancelCallback(); return CancelCallbackOnce();
} }
void FakeDriveService::SetLastModifiedTime(const std::string& resource_id, void FakeDriveService::SetLastModifiedTime(const std::string& resource_id,
......
...@@ -138,7 +138,7 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -138,7 +138,7 @@ class FakeDriveService : public DriveServiceInterface {
google_apis::CancelCallbackOnce GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallbackOnce GetFileListInDirectory(
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
// See the comment for EntryMatchWidthQuery() in .cc file for details about // See the comment for EntryMatchWidthQuery() in .cc file for details about
...@@ -146,7 +146,7 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -146,7 +146,7 @@ class FakeDriveService : public DriveServiceInterface {
google_apis::CancelCallback Search( google_apis::CancelCallback Search(
const std::string& search_query, const std::string& search_query,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback SearchByTitle( google_apis::CancelCallbackOnce SearchByTitle(
const std::string& title, const std::string& title,
const std::string& directory_resource_id, const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
...@@ -157,13 +157,13 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -157,13 +157,13 @@ class FakeDriveService : public DriveServiceInterface {
const std::string& team_drive_id, const std::string& team_drive_id,
const std::string& start_page_token, const std::string& start_page_token,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingChangeList( google_apis::CancelCallbackOnce GetRemainingChangeList(
const GURL& next_link, const GURL& next_link,
google_apis::ChangeListCallback callback) override; google_apis::ChangeListCallback callback) override;
google_apis::CancelCallback GetRemainingTeamDriveList( google_apis::CancelCallback GetRemainingTeamDriveList(
const std::string& page_token, const std::string& page_token,
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetRemainingFileList( google_apis::CancelCallbackOnce GetRemainingFileList(
const GURL& next_link, const GURL& next_link,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileResource( google_apis::CancelCallback GetFileResource(
...@@ -205,11 +205,11 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -205,11 +205,11 @@ class FakeDriveService : public DriveServiceInterface {
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback RemoveResourceFromDirectory( google_apis::CancelCallbackOnce RemoveResourceFromDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& resource_id, const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override; const google_apis::EntryActionCallback& callback) override;
google_apis::CancelCallback AddNewDirectory( google_apis::CancelCallbackOnce AddNewDirectory(
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
const AddNewDirectoryOptions& options, const AddNewDirectoryOptions& options,
...@@ -289,7 +289,7 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -289,7 +289,7 @@ class FakeDriveService : public DriveServiceInterface {
// Adds a new directory with the given |resource_id|. // Adds a new directory with the given |resource_id|.
// |callback| must not be null. // |callback| must not be null.
google_apis::CancelCallback AddNewDirectoryWithResourceId( google_apis::CancelCallbackOnce AddNewDirectoryWithResourceId(
const std::string& resource_id, const std::string& resource_id,
const std::string& parent_resource_id, const std::string& parent_resource_id,
const std::string& directory_title, const std::string& directory_title,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment